[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

What's the possible explanation for this?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 30
Thread images: 6

File: .png (6KB, 82x71px) Image search: [Google]
.png
6KB, 82x71px
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
>>
File: .png (6KB, 135x30px) Image search: [Google]
.png
6KB, 135x30px
>>60243810
:^)
>>
>>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.
>>
File: Capture.png (5KB, 198x149px) Image search: [Google]
Capture.png
5KB, 198x149px
>>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.
>>
File: Capture.png (11KB, 303x224px) Image search: [Google]
Capture.png
11KB, 303x224px
>>60243832
>>60243980
>>60245070
Furthermore
>>
>>60242916
True and false should just resolve to 1 and 0
>>
>>60245181

shoo, cfag
>>
File: .png (19KB, 616x149px) Image search: [Google]
.png
19KB, 616x149px
>>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.
>>
File: 1488129382803.gif (2MB, 600x600px) Image search: [Google]
1488129382803.gif
2MB, 600x600px
>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
Thread posts: 30
Thread images: 6


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.