Comments for Google & the Future of JavaScript
So lets piss all over JS to make it something that it isn't: Easy.
-1 for me, JS is a success and most folks building important systems are fine with it as it is. Please leave it alone.
The "how" is exactly the argument here. And the answer in the Dart memo is basically "We'll do it alone". I don't see how you've addressed that at all here, except that the world is supposed to take your word that you aren't... even though you all admit that you're working on something and that you're working on it alone.
"Make things faster" is a possibility. Though it depends on what we want. Faster is not always an improvement. It really depends on the circumstances, the context.
"Make things better" is what makes me stop any discussion. When someone is starting or closing a discussion by "This would be better", I go away. Better than what, for who, in which community, for which interests? And that is maybe part of the arrogance or misunderstanding into the discussion.
I usually prefer someone who comes to me and says: "It will not be perfect, it will not be the best solution, but we will work together"
indeed
It's entirely detached from reality yet it's the language used to define new standards. It succeeds greatly in creating barriers to entry for web developers that would want to even read standards that are in development.
I'm mostly invested in node.js these days. One great thing about node.js is that it's trying to solve the right problems. It's not concerned with the language, in our opinion the language is mostly fine and what isn't great we'll fix ourselves.
But, as new W3C standards grow we would like to implement them in pure node.js and share some commonalities across platforms. It would make my life much simpler to write PouchDB for IndexedDatabase and have a compatible API in node.js.
But at the end of the day it's actually easier to write an entire parallel implementation directly on top of leveldb than to try and implement the IndexedDatabase spec. Just reading it gives me a headache, and it's not because it's hard problem, it's just in a ridiculous language (WebIDL).
Seriously though, push for standardized bytecodes, make it work. If for some reason you see -> as an improvement on "function" then clearly you guys shouldn't be touching JS at all.
Go get bytecodes and you can write all the languages you want for yourselves, deal?
I agree that the DOM and CSS interfacing sucks - a really handy thing to have would to be able to defer reflows and repaints, guess what? Thats where RIA's spend orders of magnitude more time. DOMfragment double-buffering can mitigate some of that, but it isn't practical for 'bubbling' change propagation or when needing to alter content which may be dispersed throughout the page.
I don't know whose problems you are trying to solve, but it certainly doesn't seem to be of actual working webdevs in the trenches. Most of the things that you refer to are solved problems.
Give us WebCL, give us processing resource abstractions ala C++ AMP, give us 64bit integers, leave the foot-guns on your way out.
Google is big but Javascript belongs to all developers not Google. if you think you have better ideas, then create a language and a compiler to compile your better language to Javascript! It is way better for all of us! Don't make another JAVA out of javascript.
Javascript 2, is already here with classes and strong typing, ECMA4 , ECMA5 or whatever is called now. And you can use it on server side too, since it's supposed to be faster.
Mozilla and Google prefer to showoff pointless WebGL instead, cause it's not going to be on IE.
I feel this new thing it's going to end up like CSS a designing tool made by really smart people that sadly doesn't do design.
Corporations... Web development is a nightmare for no reason, it could be a smooth process if only we ... make an HTML5 logo! Yea!
Leave classes the hell outta JavaScript. I wish people would understand that it doesn't follow Classical inheritance. So there is no need to make it look like it does. JavaScript is Prototypal, which is awesomely powerful. If you take the time to learn how to use it.
It seems as though many, perhaps Google included, prefer classical, have a hard time getting their heads around prototypical and want to change it.
Mistake.
Though I have a hard line on power. If the goal is to create an open ecosystem, then we need to go of our way to work together. Yes working together is slower, but that it is a feature or a benefit. If the goal is to dominate the market, then there is no rule, and qualifying the work as open is a mere marketing tool.
And yes as you noticed, I'm not into "the stronger wins and others die" ;) let's call it philosophical views on life.
The difference in typing speed is much less than the reduction in characters would seem to indicate, it also forces a wider range of motion.
If the issue is with nesting in callbacks, please just educate people on things like named functions and parameter passing and context binding.
As for 'Class', I am not particularly bothered - but you should realize that this is a non-issue for most web devs, we already have sugar to take care of this.
If people can't be bothered to look at what the ecosystem already provides, why should the fundamental underpinnings of that ecosystem be fiddled with to cater to them?
There are actual, important, things that we need to be able to build bigger and better things - a modified syntax isn't one of them.
Also I agree, Scoped Object Extensions would be a major benefit.
Being limited by the platform I've set up a project allowing for a form of Scoped Object Extensions in IE6+,Firefox,Safari,Chrome and Opera. Basically it allows for you to create a namespace a functions that you can call on objects. You can read more about the syntax here http://stackoverflow.com/questions/7015693#answer-7170069 and the actual project here http://limeblack.github.com/UnlimitJS/
I hope to hear more about dash.
Leave the language alone, please! It's a thing of beauty as-is.
If you want to bastardize the language so it looks like Java, feel free to implement some sort of preprocessor in the browsers that can compile Java into JavaScript. (Replace "Java" with the language of your choice).
In fact, a C-like preprocessor with conditional compilation and the like would be great for server-side.
-
Methods: dynamic "this", use "function" or the compact method syntax proposed by Allen Wirfs-Brock [2].
-
Non-method functions (especially as arguments): lexical "this", use a block lambda.
Everyone will automatically do the right thing.
[1] http://wiki.ecmascript.org/doku.php?id=strawman:block_lambda_revival [2] http://wiki.ecmascript.org/doku.php?id=harmony:object_literals
Block lambdas don't "fix" dynamic this, they exacerbate it somewhat since they have to be intermixed with plain-old-functions which aren't bound in any way.
Mark Miller, Erik Aarvidson, and I have spent much time over the past year trying to tease apart the concerns here, and this is what has gotten me to "soft binding". If block lambdas or short functions use soft binding for the lexical "this", they'll fix some of the common cases (as you hope), but not defeat ".call(scope)" invocation and therefore avoid breaking one of the most fundamental contracts in the language. Class methods can use a similar soft-binding approach. Over time, that provides a transition strategy. But block lambdas aren't the whole shebang.
Python's "Benevolent Dictator for Life" is one of the best things of python's community. Everybody seems to love him and nobody dares to criticize his judgement. But many wonder what would happen if Guido was hit by a bus... What would happen next? What if the sum of all powers land in hands of an incompetent dictator?
On the other hand, a committee driven evolution is a tedious, exhausting and sometimes demoralizing path, but it gives guarantees that no crazy tyrant will make our world miserable. And in the end, we will all live peacefully, although not entirely happy.
In my opinion, and when talking about open source projects, the best results are achieved when a sole champion gets a first prototype of a working idea, gathering a loyal community of followers identified with his philosophy, and driving the project to wide adoption and maturity.
Will this be the solution the whole universe needs and wants? Only the quantity of loyal followers will tell. If not, it will simply die.