5 ms·
>First of all - shipping binary code to browsers. Please. No. Flash is bad enough. Say good bye to all the grease monkey style hacks and remixes and lots of oth
by pedrocr 16y ago
>First of all - shipping binary code to browsers. Please. No. Flash is bad enough. Say good bye to all the grease monkey style hacks and remixes and lots of other interesting things about the web.
Monkey patching bytecode may very well be harder but is that really used? Greasemonkey is marginal at best. What other things do you have in mind?
>Secondly - either you are a programmer or not. I can't actually tell from your article if you want to be or not. However if you want to be a good programmer then you need to learn other languages - you might not be an expert in those other languages but being able to navigate your way round them - it is good for your programmers brain.
I've learned plenty of languages and do appreciate some of the points of Javascript. I just don't see why everyone seems to defend it as the one-true-language for the client side. For everything else people make plenty of diverse choices yet somehow on the one platform that for historical reasons is stuck with a single language saying you'd rather use another implies somehow that you don't get it.
>And thirdly - Javascript is actually a real cool language masquerading as a very dull mainstream one. I resisted doing too much in it for years but as I needed to do more and more I found out that its very powerful and flexible. Also if you use something like jquery you get a lot of Ruby style bits and pieces.
I am using jQuery and it does have some goodies. The point isn't that with effort I couldn't make myself more comfortable with it. The point is that I don't see much that Javascript gives me that Ruby doesn't. So the fact I am forced to use Javascript is a net-negative for me.
>If all you have is a hammer then every thing looks like a nail. Ruby might be a pretty good language - but there is a reason there are so many other languages and its not because all the other people are idiots who weren't smart enough to come up with Ruby.
Certainly. And I do use other languages. The reason I'd like to be able to use Ruby for both codebases is that that would allow me to do interesting stuff I can't right now.
In fact the same criticism can be made of Javascript, that because it's the only hammer available everything looks like a nail. I'm proposing more languages, not less.
- junklight 16y agoThat most of the web (and obviously Flash is the exception to this) is text based is not an accident. Browsers and people are not the only thing reading the web - there are crawlers and other tools doing this, that and the other. Search engine crawlers for example go into the javascript and extract links. Also I really don't think you have thought it through as a developer - its bad enough debugging stuff in browser without it being compiled and only having basically machine code to look at. I don't think its the one true language for anyone to be honest - but expecting the browser to ship with several languages in it doesn't appeal to anyone either (and I know you just want a few byte code runtimes in but I cannot see how that would work while still maintaining all the richness and complexity of the web as it stands) anyway - I think if there was any appetite to do anything about this problem it would have been done by now. There were people grumbling about it 10 years ago and I've seen a number of projects to add languages come and go.
- pedrocr 16y ago> That most of the web (and obviously Flash is the exception to this) is text based is not an accident. Browsers and people are not the only thing reading the web - there are crawlers and other tools doing this, that and the other. Search engine crawlers for example go into the javascript and extract links. I can see how that is important for the strings in the code but I'm not aware of many use cases for crawling the actual javascript code. >Also I really don't think you have thought it through as a developer - its bad enough debugging stuff in browser without it being compiled and only having basically machine code to look at. If I want to debug javascript I need Firebug or Chrome's tools and those can very well have support for a standard debugger. >but expecting the browser to ship with several languages in it doesn't appeal to anyone either (and I know you just want a few byte code runtimes I just want one standard bytecode runtime. I can ship and have the user cache whatever runtime I need. > but I cannot see how that would work while still maintaining all the richness and complexity of the web as it stands) I still don't see what web richness is there to be had inside the <script> tag. Seems to me all the uses of it that aren't simply execution are marginal at best. >anyway - I think if there was any appetite to do anything about this problem it would have been done by now. There were people grumbling about it 10 years ago and I've seen a number of projects to add languages come and go. It seems to have been enough of a problem for google to have built GWT. I wonder why they haven't shipped a Dalvik VM in Chrome and have their GWT apps target the VM on Android and Chrome and Javascript for everyone else. Is V8 execution these days comparable to a good JVM/CLR?
- junklight 16y agoI suspect this is becoming a bit fruitless because it seems like your tack is - "I can't imagine anything other than the way I want to use the web" But let me just mention one other view: The browser, despite the inconsistencies between different brands, is very accessible. Anyone with the ability to peck away at a keyboard and read some basic instructions can make a web page - and with only a little more effort add some quite rich functionality even if only by cutting and pasting some javascript. Now imagine if instead you needed a compiler and an SDK (see footnote), if you couldn't just shove a bit of code in the page but instead it needed to be compiled and included separately. Would the web be what it is today? Look at Java and Flash - why aren't they the dominant forces on the web because they are taking very much the approach you advocate. footnote: and who would make these? Would you have one for every browser, for every language. Who would maintain them? In fact the more thought I give to it the more impressed I am that there is anything like one single common language available in all browsers
- lhorie 16y agoThe problem with more languages is that you fragment the community. Maybe it'd indeed be nice to use Ruby instead of Javascript for a project or two. But I don't think something like jQuery would be simple to port over and maintain (especially considering that the mobile landscape is even more nightmarish than desktop cross browser support). And what about plugins? And what happens when you get the odd client that wants you to do some work for them and it so happens they are using I don't know, PHP or Java on the client-side? (or CL or Scheme, if that's your cup of coffee)
- pedrocr 16y agoShould we standardize on a single language for the server-side as well?
- lhorie 16y agoThe server-side is a good example of the fragmentation I mentioned. There are classes of projects that are hopelessly redundant (e.g. minimalist MVC frameworks), and classes of projects that only exist/work in some languages for various reasons (e.g. async MySQL APIs). In an ideal world, I'd prefer if there weren't so many languages that do essentially the same thing with different syntaxes, but then again, standardization in itself is its own little can of worms (the short story being that it involves a lot of politics).