3 ms·
From the article: ""private" does not add anything new to a property. If you don't want the property to be used outside of the class ... don't use the property
by angersock 15y ago
From the article:
""private" does not add anything new to a property. If you don't want the
property to be used outside of the class ... don't use the property outside
of the class.
"const" does not add anything new to a variable. If you don't want to
change the value of a variable ... don't change the value of the variable.
"freeze" does not add anything new to an object. If you don't want to
change the shape of an object ... don't change the shape of the object.
"
Now, having started to dabble a little in Rails and Node--and hence getting exposure to Ruby and JS--I do have respect for a lot of the interesting things you can do in those languages.
That said, I've also got a experience dealing with libraries and software engineering on various sized projects, and I'm sensing a pattern here.
It seems like good practices (encapsulation, static typing, etc.) are being ignored because they get in the way of "free programming". Now, is this actually an accepted attitude in the web development world, or are these people actively promoting terrible design practices?
I understand that programming routines for web pages and the like is not the same as for thick-client applications, but is the use of your library by other people through an interface or namespace collisions really not a large concern?