JS has some pretty serious warts, and the standards process is dangerously flirting with ideas like class systems that would derail JavaScript's evolution.
Eich's viewpoint is actually pretty in line with making JS a 100 year language. He's pushing to avoid making big mistakes by mandating language features to make current implementations easier (weak refs anyone?) but make long term evolution doomed to failure.
Coffeescript doesn't really change JS in any fundamental way. It adds some sugar for things good programmers were already doing. But it doesn't go so far as to fix the things that really need fixing:
* first class message sending (no more event observers, and silly Ajax hacks)
* macros (you can do it but Function.prototype.constructor doesn't cut it)
* multiple prototypes and proper traits (see Self for details)
* distributed programming methods and remote message sends (not this XHR crap)
Instead, we're fighting battles about how to build class systems into a prototype based language. (see Smalltalk implemented in Self and JavaScript and stop talking about it already).
Node being so callback heavy really benefits from -> notation. Also if you've done what I've done and extended it to have a messaging syntax (ala Erlang) you can further simplify building distributed software. What you get with multiprototype traits (and not hacked chains) gives you mixins and more reuse. And once you add these and proper message sends you can start building distributed apps for real (and all web apps have at least 2 nodes in their graph and are already distributed, but takes too much work)
Dave
-=-=- da...@nexttolast.com -=-=-
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
---
R. Mark Volkmann
Object Computing, Inc.
--
I find that the more code I can fit in a window, the easier it is to read the overall logic. So I don't use many blank lines or line comments and I really appreciate the 33% reduction in line count that I get from coffeescript.
Even though I took classes taught by Knuth, I've never believed in the "literate programming" concept. I read code directly. Noise is just noise to me.
> I find that the more code I can fit in a window, the easier it is to read the overall logic. So I don't use many blank lines or line comments and I really appreciate the 33% reduction in line count that I get from coffeescript.
Very good points! That's exactly why I never liked this style of Java coding.
if (condition)
{
// do this
}
else
{
// do that
}
}
> I think the problem isn't syntax's and semantics. One's personal preference can be for coffeescript or javascript. I like a bit of both.
>
> Code gets ugly when there is a lot of code in a single file and the code base isn't properly organized in "packages" and classes. And this can happen with both coffeescript and javascript.
>
> Node.js solves this problem for server side JS but not for client side JS. Multiple <script> includes is the only solution, unfortunately.
There are client-side solutions. See require.js for one.
I think the problem isn't syntax's and semantics. One's personal preference can be for coffeescript or javascript. I like a bit of both.Code gets ugly when there is a lot of code in a single file and the code base isn't properly organized in "packages" and classes. And this can happen with both coffeescript and javascript.Node.js solves this problem for server side JS but not for client side JS. Multiple <script> includes is the only solution, unfortunately.Will the new version of javascript support packages (namespaces), classes, creation of bundled components (js + html markups) etc. That's what I'm more interested in.JS as of now makes it tricky to organize code neatly. Not saying it isn't possible, its just quite a bit harder to do so than Java, Python, Scala or even client side Flex (mxml / as).
- Sri
I think the problem isn't syntax's and semantics. One's personal preference can be for coffeescript or javascript. I like a bit of both.Code gets ugly when there is a lot of code in a single file and the code base isn't properly organized in "packages" and classes. And this can happen with both coffeescript and javascript.Node.js solves this problem for server side JS but not for client side JS. Multiple <script> includes is the only solution, unfortunately.Will the new version of javascript support packages (namespaces), classes, creation of bundled components (js + html markups) etc. That's what I'm more interested in.
---
R. Mark Volkmann
Object Computing, Inc.
The syntax of the language is not the biggest obstacle to writing good
programs. Let's solve the hard problems first.
Ugh. Can we stop with this tired old reductio ad absurdem about
writing in assembly?
The difference between assembly and C, or between C and JavaScript, is
not simply one of syntax, but of semantics. The tokens *mean
different things*, and there is an order of magnitude difference in
expressiveness at each level.
When a compiled-to-JS lets you write the same program with 10% as many
tokens, I'll be impressed. So far, however, all high-level languages
are roughly equivalent in terms of expressiveness, so it doesn't make
much sense (in my opinion) to get overly excited about one over
another. JS is what we've got, it's entrenched enough to be a part of
the stack pretty much forever (like C), so it pays to know it well.
CoffeeScript is not an order of magnitude more expressive than JS.
It's cute, and people like it, and that's cool. It's an interesting
science experiment and testbed for future Harmony features. But it's
not a leap.
I predict that our grandchildren and great-grandchildren will still
recognize the JavaScript language we write, because it will still be
around. JavaScript is going with humanity out into the stars.
> I predict that our grandchildren and great-grandchildren will still
> recognize the JavaScript language we write, because it will still be
> around. JavaScript is going with humanity out into the stars.
Ah, you almost brought a tear of joy to my eye. Thank you!
Surely there are advantages... for instance, who the hell knows what is going to happen on your journey; having a hackable system, to some extent, would allow you to change stuff while in flight. Seems like a _much_ better option than trying to flash a chip buried somewhere deep in the bowels of your craft or just straight up dying.
node in space, yes please.
-- Elijah
Anyone wanna make a node.js-enabled cubesat?
(http://en.wikipedia.org/wiki/CubeSat) You know it would be awesome.
--Josh
I did some research, and I found that the Language of Choice at NASA
for probes is HAL/S:
http://en.wikipedia.org/wiki/HAL/S
THIS looks terrifying. XD I'd prefer javascript for the less
mission-critical hackable parts anyway. Maybe Ada/ravenscar would be a
good fit for the mission-critical systems.
--Josh
comprehensions in coffeescript are the very definition of sugar.i think you're having a hard time understanding peoples opinion about all this.node.js is trying to solve a problem. it's an important problem.how do we quickly build fast, scalable, highly concurrent, applications and debug them effectively.
that's the problem.the language is not our problem. syntax is not our problem.people wanna use something that compiles to javascript, fine, that's their problem. we don't consider the language or syntax a problem. if you do, go ahead and take on the extra effort of using a different language and a javascript compile target.one thing you can say of node.js is that it's focused. we wouldn't be iterating this quickly if we took on your syntax problem, we owe it to ourselves and the community to simply not care about it.mostly the same goes for Harmony. there are some things we *need* (binary, weak refs) and some stuff that we'd love to have (lexical scoping) but the rest of it we're unlikely to use simply because it would be a distraction from the problem we're actually trying to solve. when you hear about Harmony features being added to solve "problems" we have ("callback soup" for instance) they aren't solving our problems, they are trying to add a feature to the language they like that in their opinion is a superficial issue they have with some node.js code they saw once.
But yeah, +1 to everything else Mikeal said :)we are solving our problems, everything else is just noise.
> > Why / How do you need it to be supported better?
>
> Not having to pre-compile would be a great improvement.
this is exactly what we won't do.
again, syntax is *not* our problem.
caring about your issues with js syntax and your need for coffeescript would be a distraction from the real problems we're actually trying to solve.
you need to become comfortable with us being indifferent if you continue to use coffeescript.
if you have an issue related to coffeescript/node.js integration, it's on *you* to do something about it on your end. just like it's on *us* to make node.js debugging better and is *not* the responsibility of some third part like ECMA.
we're taking responsibility for our problems, and we're focused on them, which means saying "no" to all kinds of things that aren't our problem, like syntax.
-Mikeal
> Why / How do you need it to be supported better?Not having to pre-compile would be a great improvement. There are also advantages of something being a de-facto standard like jQuery.
> The problem that I have is not with the existence of coffee-script, but with the risk of deleterious ( opinion ) changesEvery change to a language has people for and against the changes. That is a fact of life. I would be for the proposed coffeescript changes and you would be against them.
> To my mind the popularity of jQuery has done more harm to the webdev communityI love jQuery and it has saved me man-years of coding. It is no surprise that you dislike CS if you dislike jQuery. You obviously don't mind typing long lines of code with functions like getElementById.
> I would prefer pushing for full Bytecode standardizationI would love that if it meant Coffeescript could get on an equal footing with JS. I would still be arguing in the threads though when people object to seeing sample code in CS instead of JS.There is no discussion of bytecode in harmony or ecma, is there? It is a cool idea.
On Tue, Sep 13, 2011 at 4:42 AM, Mark Hahn <ma...@boutiquing.com> wrote:> Why / How do you need it to be supported better?Not having to pre-compile would be a great improvement. There are also advantages of something being a de-facto standard like jQuery.The relative advantage of standards depends on the quality of the standard, I find your example of jQuery to be a deeply unfortunate one for that reason. The reason that people with limited or low quality exposure to 'app scale' development in JS cry out for changes to the languages is because they haven't been using frameworks which support the kinds of activities that they sought to do. To my mind the popularity of jQuery has done more harm to the webdev community than the lack of any language feature that JS may have.
> The problem that I have is not with the existence of coffee-script, but with the risk of deleterious ( opinion ) changesEvery change to a language has people for and against the changes. That is a fact of life. I would be for the proposed coffeescript changes and you would be against them.
This is why I would prefer pushing for full Bytecode standardization where Coffee-script, Erlang-script and EcmaScript etc could be equal peers, then you wouldn't feel compelled to piss in my soup.
On Sep 12, 2011, at September 12, 20111:19 PM, Dean Landolt wrote:
On Mon, Sep 12, 2011 at 3:58 PM, Mikeal Rogers <mikeal...@gmail.com> wrote:comprehensions in coffeescript are the very definition of sugar.i think you're having a hard time understanding peoples opinion about all this.node.js is trying to solve a problem. it's an important problem.how do we quickly build fast, scalable, highly concurrent, applications and debug them effectively.
that's the problem.the language is not our problem. syntax is not our problem.people wanna use something that compiles to javascript, fine, that's their problem. we don't consider the language or syntax a problem. if you do, go ahead and take on the extra effort of using a different language and a javascript compile target.one thing you can say of node.js is that it's focused. we wouldn't be iterating this quickly if we took on your syntax problem, we owe it to ourselves and the community to simply not care about it.mostly the same goes for Harmony. there are some things we *need* (binary, weak refs) and some stuff that we'd love to have (lexical scoping) but the rest of it we're unlikely to use simply because it would be a distraction from the problem we're actually trying to solve. when you hear about Harmony features being added to solve "problems" we have ("callback soup" for instance) they aren't solving our problems, they are trying to add a feature to the language they like that in their opinion is a superficial issue they have with some node.js code they saw once.Meh. AFAICT you can only be referring to generators, and they're being added to the language because they're an orthogonal primitive with a number of use cases -- a construct proven by years of prior art (in an assortment of languages), and one that cannot be otherwise accomplished without a source transform step. Yes, they open the door to some novel alternative event loop approaches, but to say this is the only reason they're being added to the language is myopic at best.Apologies if I'm a broken record on this point, but it drives me nuts to continue seeing generators characterized this way. I don't care if node-core uses them, but dammit, I want to use them -- they solve some interesting problems that have little if anything to do with control flow. So forgive me if I selfishly continue to try and correct this myth...If you want to use them, fine, but know that generators won't be how we solve data flow in node-core, we use Streams. Because 1) they exist already and 2) pipe() can propagate back pressure messages and errors.That means that if you write an abstraction that *pushes data* with generators you're break back pressure and errors. You might not care, most frameworks break this already anyway, but it's something to keep in mind.
Now, there are plenty of things that aren't pushing data from one file descriptor to another that you may want to use generators for and there isn't a good reason in node.js not to.
Again, i don't object to the feature so much as the idea that it's "for us", which it isn't because it won't actually solve the problem they claim it will in node.js, we have a solution, it's called a Stream :)
Python's problem is syntax, that's the problem they want to solve. They are, probably, more obsessed than any community on the planet on matters of syntax.
They broke the language to make print a function rather than a statement.
JavaScript is in the rare position of broadly winning. It's in *all* the browsers. That makes it a very attractive compile target for people who think syntax is their problem to solve and don't like JavaScript's.
That's never going to change. JavaScript will continue to be an attractive compile target so people will continue to treat it as such.
Just wait until there is a good lisp to js compiler :) Everyone who used to program lisp wishes they still did :)
We are node.js, we don't care about syntax, we only barely care about the language. We must remain indifferent to the people who use us as a compile target.
Their experience being good or bad is on them to solve, not us.
It's the only way we'll stay focused enough to succeed.
Python being as obsessed as it is with syntax and not with, say, concurrency, or performance, is one of the reasons I, and many other, have had to leave. It a pretty language, I can't deny it, but it simply fails at building the applications I want to build.
-Mikeal
I too spent a lot of time with Python.
Python's problem is syntax, that's the problem they want to solve. They are, probably, more obsessed than any community on the planet on matters of syntax.
They broke the language to make print a function rather than a statement.
JavaScript is in the rare position of broadly winning. It's in *all* the browsers. That makes it a very attractive compile target for people who think syntax is their problem to solve and don't like JavaScript's.
That's never going to change. JavaScript will continue to be an attractive compile target so people will continue to treat it as such.
Just wait until there is a good lisp to js compiler :) Everyone who used to program lisp wishes they still did :)
We are node.js, we don't care about syntax, we only barely care about the language. We must remain indifferent to the people who use us as a compile target.
Their experience being good or bad is on them to solve, not us.
I can't speak for the rest of the node-core team, but it's on my
radar, at least.
This is definitely something we need to think about carefully. It's
better to do something right that we'll be happy about in years to
come, rather than something that'll make people happy today.
I think learning a language starting with his abstract alternatives is the worst idea ever. ORMs should be used only when you know SQL very well, as CS should be learnt when you already master JavaScript, and jQuery only if you made DOM yours...
I hope I'm wrong but honestly I'm afraid it's bad advice for beginners...
All of coding is abstraction. You have to pick some level of abstraction to use. You don't have to always know the lower levels. By induction you would have to know all the turtles all the way down.
there has also been a lot of discussion about what features in the language we might use in node. we have, mostly, stayed away from critiquing or asking for features directly in the next version of ECMAScript.
my comment wasn't intended to be "get this off the list!", it was more of an encouragement to get people who feel strongly about the language to start putting some of this where people designing the language will actually see it, es-discuss. i'm on there, isaacs is on there sometimes, but for the most part the opinions of node.js people, and people heavily *using* the language in general, is underrepresented.
-Mikeal