4 ms·
Along these lines, it would be cool if browsers supported some sort of "LispScript" (or at least "SchemeScript"). I hate JavaScript with a passion. This is al
by hvs 17y ago
Along these lines, it would be cool if browsers supported some sort of "LispScript" (or at least "SchemeScript"). I hate JavaScript with a passion. This is all just wishful thinking, of course.
And yes, there is a LispScript project, but it compiles to JavaScript. I'm thinking more of a native interpreter in the browser.
- amock 17y agoWhat's wrong with compiling to JavaScript? It's already widely supported and if you're compiling another language to it you can pretend like it doesn't exist. I can understand not liking JavaScript, but hating it with a passion seems excessive. Do you really hate JavaScript or just having to deal with the issues of incompatible browsers? I prefer languages like Haskell that enforce strong static typing, but as far as runtime typed languages go I think JavaScript is pretty nice.
- hvs 17y agoI guess I would be concerned about compiling to JS because you're adding another layer of abstraction on an already fussy language (when being interpreted by the browser). It's hard enough to find bugs as it is. I'm a big fan of Haskell, too. The type system alone makes it a wonderful language to work in.
- jjs 17y agoI guess I would be concerned about compiling to JS because you're adding another layer of abstraction on an already fussy language (when being interpreted by the browser). It's hard enough to find bugs as it is. On the other hand, mechanically generating the code you've abstracted away will make sure you only get the same bugs every time. ;)
- revorad 17y agoI hate JavaScript with a passion. Pray tell us, why?
- hvs 17y agoOK, maybe that's not fair. I hate the browsers' implementations of it for sure, but I'm also not a fan of prototype-based OO systems, either.
- catch23 17y agoI think most people who "hate javascript", dislike working with the DOM, is that true for you? I personally think javascript is a pretty simple & beautiful language. It has its warts, but so does ruby, python, and other dynamic languages.
- hvs 17y agoYes I dislike the DOM. Maybe I it's that JS is TOO simple (or not simple enough?). I find myself having to constantly match brackets and braces. And the browsers provide little help in the area of syntax checking. Yes, I'm aware of Firebug; it's nice (although it seems to have gotten buggier).
- lsb 17y agoPrototype (like jQuery) has really easy DOM access. $$("div.className[attributeName=value]").pluck("innerHTML") does what you expect.
- aaronblohowiak 17y agoMatching brackets and braces? Your editor should do more for you.
- catch23 17y agoYou should try Webkit's debugger (and not chrome's). It's fast and stable. Chrome's debugger is getting there, but is still missing some basic stuff compared to webkit/firebug. I rarely find syntax a problem though -- javascript syntax is pretty simple. You could probably write a javascript parser in one day, but it would probably take you a month to write a ruby parser.
- pmjordan 17y agoYou could try JSlint for syntax checking.
- heat_miser 17y agoI do wish more IDEs would integrate JSLint. I even put it into my iPhone PHP IDE Mides.
- blasdel 17y agoYou do realize that JavaScript was originally named LiveScript before the marketing goons licensed the name and added the curly braces?
- hvs 17y agoYeah, and now it is technically called ECMAScript as well. No marketing types had anything to do with that one! :)
- iamwil 17y agothough I dislike having to type function() { and }); all the time, and scoping rules are a bit confusing, I've rather gotten use to it. Maybe you should read, "Javascript, the Good Parts" http://ejohn.org/apps/learn/ http://ejohn.org/apps/learn/ Resig's js tutorial also helped hammer in why people like js and what's so special about it.
- hvs 17y agoThanks for the pointers. I really dislike the scoping rules, and prototypes.
- ynniv 17y agoJavaScript was based on Scheme with a "C-like" syntax to make it more widely appealing, so spiritually JavaScript is LispScript. More to your point, other browser scripting languages have been done and already failed. IE supports VBScript, Firefox could at one point support Python via an extension. The reality is that browser implementors want to support all sorts of things, but the only ones that matter are those that are supported in all browsers. Since you cannot create a new browser without supporting JavaScript, and JavaScript solves the code problem, it is the only language that will ever be used in browsers. Which leads into the second question: whats wrong with compiling to JavaScript? Compilation is historically (outside of a VM) the only way to write portable code. Most compiled languages have a toolchain that covers compiling, profiling, and debugging, and there is no reason to assume that a language compiled to JavaScript could not have these as well (ex an external profiler might look like dynaTrace Ajax). You might not like JavaScript, but its all we're going to get. Most people don't like programming x86 assembly, but I don't see them complaining that CPUs need to support a different assembly language.