Search posts, tags, users, and pages
PREVENTS errors?!? Where in the name of Wirth did you get that bloody idea? Loose typecasting CREATES errors all the damned time in damned near every language that does it!
Jason, Perhaps I should've been more specific - loose typing prevents overflow errors. I dabbled a lot with competitive programming a few years ago . Overflow errors due to using int or short int was a key error that I had to often encounter. I would never face that with JavaScript now, would I?
It's called range checking... though loosely ALLOCATED languages like C often butcher that, as do halfwit dumbass ignorant practices like null terminated strings.
Again though, I'm a Wirth language kind of guy; length limited for the win. If you store the length as the first byte, word, dword, or qword, you have something you can check against BEFORE you do something like start drilling down through what's stored or copying things around.
Programmers getting lazy and skipping that most basic of steps or blindly trusting their data streams is what causes 'overflows'. PARTICULARLY in sloppy half-assed languages like C, MORE SO with outright stupid data handling methods.
But again, Pascal/Modula/Ada/Assembler guy talking, "C is not my favorite programming language".
... and I'll take that risk and the little bit of extra effort over the 100% "you went full Pakled" of JavaScript's addition not always being the same TYPE of addition, randomly alternating between string and mathematical "just because". At least PHP had the common decency to give programmers a reach-around in the form of making string addition a different operator.
I don't know most of languages you quoted to mock/appreciate them, but one is bound to get frustrated if they come from more of a classical language background and mock JavaScript, citing the lack of rules that the classical languages adhere to. It's like how Tamil and English have entirely different rules, you can't say one is better than the other.
Jason Knight just to be sure you meant en.wikipedia.org/wiki/Niklaus_Wirth ? with wirth languages ? :D i had to google him. It seams likely since you references pascal but still ... :)
j got it in one. Languages based on Wirths concepts have a lot of things in common -- verbose language, (for example begin and end instead of { and }), strict typecasting, and a general concept that a LOT of mistakes programmers make shouldn't even be allowed to get past the compiler!
The less code you use, the less there is to break