Software Developer who works mostly on Web stuff. I like JS, but I also like other things. I also do photography, and look at sneakers online that I will never be able to buy.
Well, I do agree that the problem can be solved with better object design from the developer's side. A snippet like this one:
if(user.isBornInMarch)console.log("You were born in March!");
is fairly readable.
However, it depends heavily on a developer having the foresight to design a class like so and the other developers knowing of this design detail.
The other thing to remember is that this proposal is not intended to give JS a new language feature or give developers the ability to do something that they haven't been able to do before, it is just to make the life of the developer a little bit easier and the resulting code a little bit easier to read.
I understand debating with good intentions, I appreciate that. No one here wants to start an actual flamewar :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Well, I do agree that the problem can be solved with better object design from the developer's side. A snippet like this one:
is fairly readable.
However, it depends heavily on a developer having the foresight to design a class like so and the other developers knowing of this design detail.
The other thing to remember is that this proposal is not intended to give JS a new language feature or give developers the ability to do something that they haven't been able to do before, it is just to make the life of the developer a little bit easier and the resulting code a little bit easier to read.
I understand debating with good intentions, I appreciate that. No one here wants to start an actual flamewar :)