5 ms·
I really like Node, but I want a language with sane semantics. What's the best option apart from JS and CoffeScript. TypeScript is awesome, but I'm afraid that
by lukasm 13y ago
I really like Node, but I want a language with sane semantics. What's the best option apart from JS and CoffeScript. TypeScript is awesome, but I'm afraid that there will no good community, because of MS stigma.
- codygman 13y agoYou can use Haskell for the same semantics if I understand you correctly. Actually coming from Node, Go might be a better fit.
- lukasm 13y agoIn other words I would like to use language that runs on Node, but it's not JS or CS
- rubiquity 13y agoWhen did sane and static typing become synonymous?
- lukasm 13y agosane has nothing to do with static typing. Python is a language which is dynamic and has a sane semantics. e.g. in JS {} + {} is NaN and many other examples.
- jkrems 13y agoThere's a language where `{} + {}` does something useful? Or is the complaint that it should `TypeError`?
- pekk 13y agoIf it does anything at all, it certainly shouldn't generate NaN
- tel 13y agoWhy not? If (+) is numeric addition and coercion is free then {} is NaN and so is {} and so is NaN + (anything) and so is (anything) + NaN. Which is not to say that it's a good choice, but instead to say that the badness stems from overloading (+) too much and having free coercion.
- anonymouz 13y agoIt's obviously {}, duh! ;) (In one of the ways of constructing the natural numbers within ZFC set theory in mathematics, one identifies 0 with the empty set {}, 1 with {{}}={0}, 2 with { {}, {{}}} = {0,1}, and so on.)
- tel 13y agoRight, sane semantics: http://cs.brown.edu/research/plt/dl/lambda-py/lambda-py.pdf http://cs.brown.edu/research/plt/dl/lambda-py/lambda-py.pdf Saner perhaps, but still ungodly complex with weird edge cases.
- rubiquity 13y agoHow would using TypeScript fix that?
- cgag 13y agoClojurescript sane and pretty mature now. http://himera.herokuapp.com/synonym.html http://himera.herokuapp.com/synonym.html
- outside1234 13y agoDefinitely a good community, have a look at all of the type libraries alone: https://github.com/borisyankov/DefinitelyTyped https://github.com/borisyankov/DefinitelyTyped
- michaelwww 13y agoGoogle Dart and TypeScript are pretty good alternatives to JS in some cases and Dart has the notion of streams. https://www.dartlang.org/docs/tutorials/streams/ https://www.dartlang.org/docs/tutorials/streams/
- _greim_ 13y agoPerhaps Dart?