3 ms·
I knew C; C was a friend of mine. Javascript, you're no C! When it appeared, C was a revolution in programming languages. It offered a combination of performa
by smitherfield 11y ago
I knew C; C was a friend of mine. Javascript, you're no C!
When it appeared, C was a revolution in programming languages. It offered a combination of performance and expressiveness that simply outclassed anything else available (still true today, 43 years later, if more narrowly). It instantly became the most popular and held that position to this day, becoming a major influence on virtually every other popular programming language that's come since.
Now, of course, C is much better suited for, say, writing an operating system than it is for writing security-intensive internet services. (A concept which did not exist in 1972). But, all things considered, it was as close to perfection as a new programming language has ever come at the time of its introduction.
JavaScript is not even in the same realm; much superior, existing scripting languages (Python, Ruby, even Perl or some Lisp dialects) were passed over in favor of a deliberately half-assed effort to advertise Java with a language that shared a name and a superficially similar syntax, which (almost accidentally) became the only VM that any web browsers implement.
- raverbashing 11y ago> much superior, existing scripting languages (Python, Ruby, even Perl or some Lisp dialects) were passed over Python existed in 1995, but I doubt it was very known at the time. Ruby was created in 1995 Lisp is older, sure, but maybe there were concerns about the syntax and interpreter requirements? "But, all things considered, it was as close to perfection" Pascal didn't have a braindead way of dealing with strings. C's syntax is weird and prone to bugs, "if (a = 1)" being one example.
- smitherfield 11y agoYes, C's string handling is pretty crappy (especially given how important a data type strings are in Unix). And its operator precedence rules aren't always the best. But just like 10 million Elvis fans can't be wrong, neither can a language that is to programming what Elvis, the Beatles, and Michael Jackson put together were to music be anything other than a triumph of engineering. Better string handling or not, just as surely as video killed the radio star at about the same time, C killed the Pascal programmer. And the FORTRAN programmer, and COBOL, and BASIC, and assembler, and pre-1972 Lisp, and all the other old programming languages that are nowadays too obscure for me even to list. And operator precedence or not, every non-Lisp programming language of any popularity today apes C's syntax, not Ada or BASIC or somesuch. I'm not saying C is perfect. I don't even particularly like coding in C; I'm just saying that it just was a huge breakthrough in programming language design at the time it came out, and was overall the best designed language ever to that point (which, Lisp fanatics and Donald Knuth aside, I think most would agree with). Certainly not something you could ever say about JavaScript with a straight face. My point re scripting languages was that if Netscape had wanted to be on the bleeding edge, they still had much better choices. JavaScript is a programming language created in one week, where one of the major design considerations was to be an advertisement for a different programming language, and it shows. It certainly showed in 1995, before we had 20 years, billions of dollars and millions of man-hours invested by all the major companies in optimizing VMs, improving the standard, creating libraries and all the other miscellaneous forms of putting lipstick on a pig.
- aaronem 11y ago>Lisp is older, sure, but maybe there were concerns about the syntax and interpreter requirements As I understand it, Brendan Eich originally spent a lot of effort on a Scheme implementation to serve the browser-scripting role for Netscape/Mozilla, but couldn't get it done in time and hacked up Javascript in a hurry to prevent an even worse alternative from becoming the de facto standard.
- marcosdumay 11y agoC string functions lets me copy an image from a memory position to the video controller for displaying, or to the disk for storage. Pascal's ones don't. Calling it "better" is completely missing the point. Nobody would have written UNIX in Pascal, for obvious reasons.