Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
To Hell with Setters and Getters
(
erik-engheim.medium.com
)
3 points
by
socialdemocrat
on Nov 26, 2020
|
hide
|
past
|
favorite
|
3 comments
phendrenad2
on Nov 26, 2020
|
next
[–]
This is why I like Ruby, something can look like a variable but be a setter/getter under the hood. Wish all languages had that functionality. Maybe many do that I'm not aware of, with some metaprogramming hackery.
Someone
on Nov 26, 2020
|
parent
|
next
[–]
Many recent languages have properties (
https://en.wikipedia.org/wiki/Property_(programming)
)
socialdemocrat
on Nov 26, 2020
|
prev
[–]
An article about why using setters and getters for member variables is frequently a bad choice.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: