What's the possible explanation for this?
It's possible that they wanted to keep coders on their toes
>>60242786
>>60242825
Adds value to our wages.
>>60242786
Also, they probably didn't want to throw an error
What should Array(true) or Char(false) equal
>>60242786
empty array is an object. All objects evaluate to true.
empty string evaluates to false because it is empty.
>>60242786
honestly this doesn't annoy me as long as you have to do the cast
Requesting the I did it for you C++ pasta.
>>60242786
Dynamic programming languages were a mistake.
In the end, it always causes problems.
semantics
>>60243144
This. A programming language should make it hard to write nonsense.
>>60243172
No.
>>60243144
>>60243172
COBOL master race?
>>60242786
Special treatment for string so that empty string and null string both mean "no value".
>>60242925
A string is an object.
>>60243760
not in js
>>60243832
That doesn't count, those string constructors are BS.
"" instanceof Object returns false.
They still kinda are objects though, with methods and all that.
>>60243832
>>60243980
If you create a String object, then yes it is an object, but it is different from empty string ('').
much like in C# there is string and String.
>>60243832
>>60243980
>>60245070
Furthermore
>>60242916
True and false should just resolve to 1 and 0
>>60245181
shoo, cfag
>>60245211
>>60245181
>>60242916
it actually does in JS. the power of dynamic typing!
>>60242786
Have you ever tried storing things in Array under function indexes? ECMAScript can be abused in a lot of ways if you really want to.
>get a "Java Developer" job
>they have me doing development in node.js a couple months in
>now can't get a job in finance because it seems every bank uses Java
Empty array still has member values from its prototype
String literal does not
>>60247190
I like this explanation
Anyone have any experience in using the more functional flavour libraries like ramda, underscore, lodash, highland? What are your preferences?
I'm thinking at the moment I'll just use highland and use ramda for some parts where it's more intuitive to me
>>60247170
Nobody gives a shit what programming language you use as long as you can prove that you know how to program
fuck objects and shit
>>60247221
I've only ever used lodash and that shit is the best. Honestly it should be incorporated into the standard library for the next ECMAScritpipt because everyone already uses it
>>60247262
OOP is comfy though
so long as you don't have to use it for everything, I mean