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
>>30202it 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.
>>30203>Because it was designed to be used by people who aren’t computer scientists nor programmers and thus be as permissive as possible.That doesn't make any sense. Beginners should stay away from a language that behaves in a nonsensical, inconsistent and seemingly random ways. Just look at the first two or the last two examples OP gave.
It's like they deliberately made a language that would be more prone to stupid bugs.
>>30373Yes but the bugs are in terms of unexpected output, they seemingly wanted JS to be like HTML and CSS in that you don't get scary error messages when you do something technically incorrect like use the string input of a textbox as an integer.
Everyone being like
>that's retarded, they should have actually had a really strict language to force newbs into being good programmersdon't realise that all that was important in the 90s was adoption during an era when the world wide web was still primarily marketed as a platform for user content that anyone can work with but otherwise corporate uses was a big question mark outside of just being a network of brochures.
Yes, with the power of hindsight and seeing how far JS went and how complicated webpages ended up getting after Web 2.0, it seems obvious now that a language easier to reason about the outcome of would have been preferable. But alas, the key to adoption was having HTML, CSS and JS not put anyone off of this new humanistic technology by shitting out error messages whenever you forget a closing tag or compare the wrong types and it apparently worked at achieving adoption.
>>30373a computer always appears to behave in nonsensical and random ways when you're a beginner.
that there are such terrible consequences downstream from making an easier-than-usual language that actually behaves randomly is by and large a failure by everyone else to make a good beginner's language - but how can they when they don't know what a beginner wants or needs?
i think of it like drawing - ask an artist how to draw and he'll tell you to grind away at anatomy or construction or whatever "to avoid building bad habits", but "bad habits" are the concern of someone who already knows how to draw: if you really want to
learn how to draw from an unskilled starting point, the single most important rule is
to draw, if grinding anatomy makes it harder to draw and isn't fun,
you won't draw. drawing but building bad habits is much better than not drawing at all - and you can basically ctrl+f "drawing" for "coding" here. so long as you're not in a production environment on a program i'm likely to use: do it badly, then learn from your mistakes.
>>30373Read the thread. It's not the way it is because it was designed to be a "beginners' language", but because it was done on an impossibly tight deadline.
>>30380Nobody outside the clueless imbeciles in this thread consider JavaScript to be a beginners' language.
>a failure by everyone else to make a good beginner's languagePython. That's THE beginners' language and it is good. Not perfect, but good. It solves exactly the problem you describe, it lets you program without having to grind "anatomy".
>>30380>>30381>>30382It’s right there on the Wikipedia page
>The goal was a "language for the masses", "to help nonprogrammers create dynamic, interactive Web sites".With the source being Eich himself and Netscape.
If you want to seethingly claim
>erm ackshually it was never for beginners or non-programmers because it’s confusing type conversion rules aren’t a consequence of trying to implement consistency with having all types implicitly convert, it’s just the language was rushed, Netscape hated both new and old developers alike and the industry are all retards who adopted JS despite knowing one day it will become a language for more than 50 line tidbits of interactivity on Web 1.0 pagesThen fine, but you’re completely divorced from reality.
Unique IPs: 22