News for hackers. Stuff that matters.
Re:Classes are Expressions by wvenable on Thursday June 04, 2015 @05:01PM (#9662015)
You can't check that the convention is being broken which makes refactoring more difficult. There will always be a temptation for some developers in some situations to mess with the internal state of objects.
Re:Classes are Expressions by woah on Thursday June 04, 2015 @07:32PM (#9662918)
In general, js is more about good practices and craftsmanship, and less about finding ways for the language to force people to do things.
Re:Classes are Expressions by wvenable on Friday June 05, 2015 @12:09PM (#9666274)
I find this argument to be lacking; if you're using good practices and craftsmanship then nothing is being forced on you as you would not encounter an error for doing something improper.

I prefer to mark up my code as private/protected/public for my own purposes both as built-in documentation and to have one less thing to think about after it's done. Plus underscores are ugly.

Re:Classes are Expressions by woah on Monday June 08, 2015 @04:08PM (#9682010)
Yes, but you have to do a lot more typing, plus you have to do a lot of things to satisfy a stricter language. There are a lot of abstractions like interfaces, delegates, etc, that exist to get certain logical patterns past the language's strictness. In loose languages you can just write the patterns you want without the overhead.
Re:Classes are Expressions by wvenable on Monday June 08, 2015 @04:55PM (#9682328)
In other words, with less strict languages you can be sloppier. Once projects get to a certain size, language strictness is a huge benefit.

And, in some extent, it's actually freeing. I can reach in and change something big in a strict/compiled language and the compiler/IDE will tell me where I have to make other changes throughout the whole project. In a dynamic language, I either have to rely on unit testing, grep, or just having it break at runtime. But the real truth is, you just don't make those kind of changes when your language isn't strict. The pain isn't worth the payoff.

Re:Classes are Expressions by Jare on Thursday June 04, 2015 @05:34PM (#9662261)
Developers willing to make messes in the code must be identified ASAP, and the "_" acts as an easy to see red flag.
Re:Classes are Expressions by stuartaxelowen on Friday June 05, 2015 @12:27PM (#9666369)
As they say in Python - we're all consenting adults.