Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm really sad to see this misconseption over and over on HN.

Please don't be rude.

Verbosity is so much worst than syntax complexity because you ends up having dozens of different patterns that do the same thing overall but with subtile differences on edge cases.

There's a level of verbosity/terseness that's ideal for (your average) human. I don't know precisely what that level is, but I think many programming languages, such as C++ and Rust, have stepped way past that line.

If you look at JavaScript pre-ES6, you had at least 10 ways of doing OOP with really different behaviors when it came to inheritence or encapsulation. This makes the code so hard to understand.

The problem with JavaScript OO was, in my opinion, the use of prototypes.

As long as you introduce syntax to help with what people are actually doing (and not juste because it looks cool) syntax addition enhance the code readability.

This is simply an unsupported claim.



> I don't know precisely what that level is, but I think many programming languages, such as C++ and Rust, have stepped way past that line.

There are no languages in the same domain that don't have a comparable level of syntax and semantic complexity given the intrinsic nature of the information they want to encode.

And I would make rather take sigils than using a bunch of different keywords every time I need to talk about lifetimes and pointers.

To date I have not seen languages with comparable complexity expressed with more elegant syntax. Some domains just have irreducible complexity.


Use of prototypes, excessive falsy values, function scope, for each loping over object properties vs. arrays, and undefined vs. null are just a few things that will confuse people who see Java-like name and syntax and expect Java-like behavior. Maybe if you learn JavaScript first, it makes sense, but for everybody coming from other languages with C-like syntax, it is just too surprising.




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

Search: