[ home / rules / faq ] [ overboard / sfw / alt ] [ leftypol / edu / labor / siberia / lgbt / latam / hobby / tech / games / anime / music / draw / AKM ] [ meta ] [ wiki / shop / tv / tiktok / twitter / patreon ] [ GET / ref / marx / booru ]

/tech/ - Technology

"Technology reveals the active relation of man to nature" - Karl Marx
Name
Options
Subject
Comment
Flag
File
Embed
Password(For file deletion.)

Not reporting is bourgeois


 

why the FUCK is javascript a vibes based language?

<[] + {};

>returns '[object object]'
<{}+[];
>returns 0
<[]+[];
>returns ' '
<0 == [];
>returns true
<0=="0";
>returns true
<"0"==[];
>returns false
<2+"2";
>returns '22'
<2-"2";
>returns 0

Because it was designed to be used by people who aren’t computer scientists nor programmers and thus be as permissive as possible.

That’s not the real question though, the real question is why would they insist that it must have C-like “Java” syntax despite that knowledge? They could have done anything, they could have stuck to an S-Expression system like initial planned. Everyone could’ve been forced to learn Scheme by now instead of NotJava-Script, which would have been very based.

>>30203
after taking Java, C, C++ and C# courses in college, I ended up getting a desk job at an engineering firm where I never had to program. 10 years later I'm suddenly dealing with javashit and it sucks so much fucking ass and is so stupid and counterintuitive in its output that I don't understand how this was supposed to be "easier" for people who aren't computer scientists. it is downright illogical at points.

>>30203
>Because it was designed to be used by people who aren’t computer scientists nor programmers and thus be as permissive as possible.
No? It's because it was hastily thrown together in ten days. It was not designed.

>[]+[] -> ' '
What transformation does this even represent? Are javascript strings null terminated? Where does the space come frome?

>>30206
There's no space, it's an empty string. For some reason addition with arrays converts them to strings:
> [] + [] == ""
> [1] + [2] == "12"
> [1] + ["a"] == "1a"
> [1] + [["a", "b"]] == "1a,b"
> [1] + [["a", "b"], "c"] == "1a,b,c"

>>30205
>No?
Yes. Dynamic typing isn’t something that happens unintentionally due to a lack of design.

Why the fuck is js everywhere? It should've stayed within the browser and even then should've been killed for something better ages ago.

>>30209
Because pretending like 12 year old scriptkiddies are competitive labour drives down salaries for coders

>>30208
Dynamic typing does not necessarily mean idiosyncratic type coercions. Just look at Scheme, from which JavaScript probably inherited dynamic typing.

Brenden Eich is the modern Yakub / Openheimer. Invented JavaScript in a single week and everything since is the nuclear winter of that. Everything he's done since is in the persuit of releasing an equal or greater plague upon the world.

>>30202
it was designed for some shitty "magic" on what were basically text documents (hypertext) and people thought that since it is easy to use it will destroy the need to hire coders because anyone can use it and so they built a whole bunch of shitty tools with it.
same reason why VB was so popular for a time and why drag-and-drop ASP.NET mess was hot shit until ruby on fails came along that promised to make your shitty "webapp" in 10 mins (5 min blog tutorial), etc.

JS is the same thing from 1995 that AI hype is today.


Unique IPs: 10

[Return][Go to top] [Catalog] | [Home][Post a Reply]
Delete Post [ ]
[ home / rules / faq ] [ overboard / sfw / alt ] [ leftypol / edu / labor / siberia / lgbt / latam / hobby / tech / games / anime / music / draw / AKM ] [ meta ] [ wiki / shop / tv / tiktok / twitter / patreon ] [ GET / ref / marx / booru ]