Fogus: Node.js should become its own language
blog.fogus.me
Fogus: Node.js should become its own language
1–10 of 79 posts
Re: Fogus: Node.js should become its own language
#2The Javascript that can be used only via add-ons is not the eternal Javascript...
Re: Fogus: Node.js should become its own language
#3That's mostly just true for browsers. Javascript itself has very few faults.
My biggest annoyances with the language are: Lack of lexical scope, no trailing commas and semicolon usage that differs from C.
I could complain all day about my annoyances with browsers (or just IE).
Re: Fogus: Node.js should become its own language
#4Off the top of my head, I'd say because "var result = long_io_operation(req);" is not only not self-documenting but actively deceptive if long_io_operation is an asynchronous call.
I'm not sure I see what's to be gained by pretending closures don't exist.
Re: Fogus: Node.js should become its own language
#5dosomethingasync(f() { });
With a language so dependent on callbacks, anonymous function are so verbose.
Re: Fogus: Node.js should become its own language
#6all I'm asking for with Javascript is a shorter function keyword. Let me have dosomethingasync(f() { }); With a language so dependent on callbacks, anonymous function are so verbose.
dosomethingasync ->
#etcRe: Fogus: Node.js should become its own language
#7Re: Fogus: Node.js should become its own language
#8"My problem with Javascript has always been that expertise is defined more in terms of understanding its faults rather than its features." That's mostly just true for browsers. Javascript itself has very few faults. My biggest annoyances with the language are: Lack of lexical scope, no trailing commas and semicolon usage that differs from C. I could complain all day about my annoyances with browsers (or just IE).
Re: Fogus: Node.js should become its own language
#9"My problem with Javascript has always been that expertise is defined more in terms of understanding its faults rather than its features." That's mostly just true for browsers. Javascript itself has very few faults. My biggest annoyances with the language are: Lack of lexical scope, no trailing commas and semicolon usage that differs from C. I could complain all day about my annoyances with browsers (or just IE).
foo = function(){
var bar=0
return function(){
bar=bar+1
return bar
}
}
baz=foo()
baz() // => 1
baz() // => 2
baz() // => 3
bar; // => ERROR: bar is not definedRe: Fogus: Node.js should become its own language
#10"My problem with Javascript has always been that expertise is defined more in terms of understanding its faults rather than its features." That's mostly just true for browsers. Javascript itself has very few faults. My biggest annoyances with the language are: Lack of lexical scope, no trailing commas and semicolon usage that differs from C. I could complain all day about my annoyances with browsers (or just IE).
Except that Javascript has lexical scope. Use the var keyword to define local variables. foo = function(){ var bar=0 return function(){ bar=bar+1 return bar } } baz=foo() baz() // => 1 baz() // => 2 baz() // => 3 bar; // => ERROR: bar is not defined
And nested loops that both use "i" would work.