Re:Yukihiro Matsumoto: “Ruby is designed for humans, not mac...
by dragonwriter on Sunday January 19, 2020 @12:36PM
(#22092643)
@vars are data members, not properties.
“Properties”, in most languages that have them, are an way to make method access look like access to data members (no parens, getters just use the name, setters use name + = with the new value on the right of the = instead of in parameter position.)
Re:Yukihiro Matsumoto: “Ruby is designed for humans, not mac...
by Nullabillity on Sunday January 19, 2020 @07:17AM
(#22090995)
But Scala still differentiates between `def shouldBePure: Foo` and `def probablyHasSideEffects(): Bar`.
What you're describing holds in e.g. Scala, where it's by design: they feel it should be an easy-to-change implementation detail whether a name is backed by a direct field access or a method. IMO that's a reasonable stance in a functional(ish) world.