Hacker News new | past | comments | ask | show | jobs | submit login

Why not give your "setters" a real name that describes what they're doing?

https://news.ycombinator.com/item?id=15606777

In the structs & records world (C, F#, Rust, etc) they never seem to have this issue. Either the struct is completely transparent and you can read and write fields at will, or it's completely opaque and the functions that operate on it have better names/semantics than "setField".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: