Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't see Python as being cleaner than CoffeeScript. CS is very similar but with less punctuation. How do you figure that one?

Have you tried using CoffeeScript indented with two spaces, or using the async module? You don't always have to do continuation passing, and I feel like Node.js's way is a lot more straightforward than anything like Twisted.



> I don't see Python as being cleaner than CoffeeScript. CS is very similar but with less punctuation. How do you figure that one?

It's more semantics than syntax, although CS's syntax is sufficiently complex and nonredundant that the compiler sometimes reports syntax errors in confusing places, or worse, finds a way to interpret them as something I didn't want them to mean. But syntax can suck my dick. It's nothing more than a constant factor. It's more things like:

* No iteration protocol.

* The built-in dictionary type only allows string keys.

* The built-in dictionary type has magical keys like "constructor" by default.

* [0..4] includes 4. The correct thing, [0...4], has a longer spelling.

* [0...i] has i items, except when i is negative, in which case it has -i items. (To be fair, Python has a similarly screwed-up special case in its array indexing.)

* No built-in lexicographical comparison of arbitrary sequences.

* No comparison protocol.

* String conversion of aggregates is brain-dead. '' + [0...4] == '' + [[0...4]].

* It inherits JS's incorrect closure of this; { x: (=> (=> @top)), top: 5 }.x()() isn't 5.

> using the async module? You don't always have to do continuation passing

I haven't tried using the async module, but you got my hopes up. No dice, though. All of its functions take a continuation as their last argument!

There's a lot to be said for straightforwardness, but Twisted's non-straightforwardness justifies itself by nuking boilerplate.


>I don't see Python as being cleaner than CoffeeScript. CS is very similar but with less punctuation. How do you figure that one?

Python's syntax is less confusing and less likely to introduce subtle bugs. I've been hurt enough times by CoffeeScript's ambiguous syntax.

>You don't always have to do continuation passing, and I feel like Node.js's way is a lot more straightforward than anything like Twisted.

I like Twisted's way because it is object-oriented and well-structured. It doesn't lend itself to spaghetti code, unlike node.js.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: