4 ms·
Unpopular opinion, but I think we'd be so much better off if Netscape had just embedded a Perl interpreter instead of creating JavaScript. Perl CGI was already
by _2z1p 3y ago
Unpopular opinion, but I think we'd be so much better off if Netscape had just embedded a Perl interpreter instead of creating JavaScript. Perl CGI was already the dominant server side technology at the time and it has incredible string manipulation capabilities that would be beneficial for browser scripting.
- speedgoose 3y agoJavaScript being some kind of Lisp dialect with a C syntax is good IMHO. You also get some Perl inspired features in JavaScript, like the regular expression engine, and the not so user friendly array methods like slice and splice. The DOM API is also a bit more robust than string manipulation.
- jeremyjh 3y agoI know its history but Javascript is not in any meaningful sense a "Lisp dialect". Code is not data, code is not even an object, you have to define a function, closure or object to manipulate the code itself.
- runlaszlorun 3y agoI’m thinking Self would be a better reference but I’m guessing there’s a limited audience s who’s ever even seen it.
- runlaszlorun 3y agoI’m not sure ‘robust’ is a term that often comes to mind for me regarding the DOM API.
- akira2501 3y agoI recall the C interface to perl being exceptionally ugly. It was not designed with embedding in mind. That was one of the things that convinced me to move to ruby.. matz had exceptional taste when it came to the C api.
- casey2 3y agoShould have just embedded a shell with Unix inspired (perhaps even plan 9 - 1992) command suite, implicitly treating piped HTML as plaintext corresponding to the rendered page. So the user which is 99% of people is better served rather than some random developer who happens to know perl.