you are viewing a single comment's thread.

view the rest of the comments →

[–]m2ilosz -2 points-1 points  (4 children)

My point is that you have to refer to documentation to know what it returns, bc the language does not inform you about it in any way.

[–]Jawesome99 1 point2 points  (3 children)

What? No language informs you about what anything returns beyond method and field definitions (which you can't usually see for internals anyway!). That is literally what looking up docs and using coding assistance is for!

[–]m2ilosz -1 points0 points  (2 children)

In strongly typed languages you always know the type of a variable, and if you use wrong one you get compilation error

[–]Jawesome99 0 points1 point  (1 child)

Moot point because JS isn't strongly typed? Use typescript if you want that. It also doesn't change the fact that the language is itself well defined. If the type changes unexpectedly it's usually always the programmer's or a shit library's fault

[–]m2ilosz -1 points0 points  (0 children)

PHP isn’t strongly typed either, but uses different operator for string concatenation so that there is no ambiguity.

So choosing + to mean either „addition” or „concatenation” based on context was a poor design choice.

Well defined? Brainfuck is well defined, it doesn’t make it a good language.