jashkenas/coffee-script — Issue #2180: Spaceship operator
Author: itrelease
Created: 2012-03-06 13:23:54+00:00
State: open

Guys what do you think about [spaceship operator](http://en.wikipedia.org/wiki/Spaceship_operator):

```
one = ->
1

two = ->
2

a =
t: 3 <=> 4
e: one() <=> two()
```

will be transformed into:

```
(function() {
var a, one, two, _ref, _ref1;

one = function() {
return 1;
};

two = function() {
return 2;
};

a = {
t: 3 < 4 ? -1 : 3 === 4 ? 0 : 3 > 4 ? 1 : null,
e: (_ref = one()) < (_ref1 = two()) ? -1 : _ref === _ref1 ? 0 : _ref > _ref1 ? 1 : null
};

}).call(this);
```

?