6 ms·
Because sometimes the layer on top can express ideas more succinctly. A classic example is CoffeeScript's fat arrow syntax. It expressed a pattern in JavaScript
by jherdman 7y ago
Because sometimes the layer on top can express ideas more succinctly. A classic example is CoffeeScript's fat arrow syntax. It expressed a pattern in JavaScript we didn't, at the time, have a shorthand for. Example: https://coffeescript.org/#fat-arrow https://coffeescript.org/#fat-arrow
- pjmlp 7y agoAnd now it is dead, leaving behind a pile of code to rewrite in next cool toy.
- throwaway894345 7y agoIn fairness, it's dead because it was shitty and made most things harder, and the things it did improve JS copied. If OCaml fixes its syntax, then we won't have any need for Reason.
- pjmlp 7y agoThere isn't anything to fix.
- throwaway894345 7y agoIf you were right OCaml wouldn't be the only language with a popular syntax veneer.
- erichocean 7y agoTypeScript says hi.
- staticassertion 7y agoTypescript makes virtually no changes to JS syntax, except what's necessary to support types.
- erichocean 7y agoTypeScript classes, constructors and enums say hi. Talk about moving the goalposts...
- throwaway894345 7y agoNo one is moving the goalposts. TypeScript's raison d'etre is to add static typing to JS. Reason's is to fix the syntax. (Yes, TS adds new grammatical constructs, but grammatical constructs are about grammar, not syntax, contra Reason).
- staticassertion 7y agoMaybe I just don't have enough experience, but I use classes in Javascript and TypeScript, as well as constructors, and they look virtually identical to me. What am I missing here?
- throwaway894345 7y agoTypeScript extends the syntax to support type annotations; it's not trying to fundamentally fix JS syntax.
- erichocean 7y agoNow enforcing type safety isn't a fundamental part of a language? I get the impression that you'd dismiss Rust as "basically C". ¯\_(ツ)_/¯
- thedufer 7y agoIt is, that's the point. Reason is, as was said upthread, a "veneer". It changes the syntax only, nothing else is different (you can convert back and forth between the syntaxes losslessly). TypeScript makes deep changes to the language by adding type safety.
- throwaway894345 7y agoI have no idea how you got that from my post. I don’t know whether type safety is “a fundamental part of a language” or not, but that’s irrelevant to my point. TS extends the JS syntax to support type safety. Reason changes OCaml’s syntax altogether because it’s broken. Big difference.
- WorldMaker 7y agoOn the other hand, if Reason were such a massive improvement to OCaml syntax, where are the people clamoring for F# to adopt more of Reason's ideas? (Admittedly, F# already shares a couple Reason ideas like C-style comments instead of OCaml's traditional ones. So the waters are clearly muddy here to begin with, but a lot of the big things like let-binding scopes and ;; versus ; presumably would be big F# requests if Reason was so strongly superior to the inherited OCaml legacy.)
- throwaway894345 7y ago> where are the people clamoring for F# to adopt more of Reason's ideas? Probably writing C#.
- gameswithgo 7y agoF# already has the main things people like about Reason.
- pdimitar 7y agoAs a guy who tried to get into OCaml development several times, the language is not the problem at all. It's the several different "standard" libraries, lack of good official agreed upon tutorials and guides, and the fact that it has a GIL and is essentially single-threaded. If OCaml had Erlang's runtime (parallelism and concurrency via actors with message inboxes) it would likely be the most used language. Its lack of adoption isn't at all related to syntax IMO. Programmers use all sorts of quirky syntaxes and the world hasn't ended yet.
- throwaway894345 7y ago> As a guy who tried to get into OCaml development several times, the language is not the problem at all. It's the several different "standard" libraries, lack of good official agreed upon tutorials and guides, and the fact that it has a GIL and is essentially single-threaded. I agree that those things are pain points (I said as much upthread), but clearly the language is also part of the problem or else there would be no interest in Reason. > As a guy who tried to get into OCaml development several times, the language is not the problem at all. It's the several different "standard" libraries, lack of good official agreed upon tutorials and guides, and the fact that it has a GIL and is essentially single-threaded. A big reason Erlang is similarly unpopular is its syntax as well (many of the most popular languages are dynamically typed, so we know it's not the type system). This theory is supported by the relative popularity of Elixir, which shares Erlang's runtime and which has enjoyed a fair amount of popularity in a relatively short time despite introducing a number of syntax- and non-syntax-related quirks. OCaml on BEAM would certainly appeal to the intersection of FP and static-typing enthusiasts, but it would not remotely be popular.
- pdimitar 7y ago> OCaml on BEAM would certainly appeal to the intersection of FP and static-typing enthusiasts, but it would not remotely be popular. I realise what I said is not an undisputable truth and I wouldn't argue about it. I probably should have just said that I am observing an almost global strive for dev teams to be able to catch bugs earlier and to have a bit more guarantees by the mere virtue of the program successfully compiling. But it might be my filter bubble. This is why I said an OCaml with the BEAM guarantees would likely rise very high; because my observations lead me to the belief that people want more compile-time guarantees. And yeah, that might be a skewed observation.
- yawaramin 7y agoDangling else comes to mind.
- no_wizard 7y agoDoes Not look dead to me. last activity is within the last 30 days or so. https://github.com/jashkenas/coffeescript/ https://github.com/jashkenas/coffeescript/ Its not as popular to be certain, though.
- pjmlp 7y agoI bet Fortran and Cobol are getting more jobs offers than CoffeeScript.
- blunte 7y agoWhereby you seem to be making the case for "dead" languages.
- pjmlp 7y agoExcept Fortran and Cobol are pretty much alive, with ISO still releasing languages updates, recently LLVM got a Fortran compiler, supported by the likes of ARM and NVidia. They are just "dead" in that they are specialized programming languages with a domain of their own, that magpie developers don't find attractive to put on their CV. CoffeeScript in 2020 is just legacy code that one wants to get rid of, because some juniors found it cool to smuggle into the IT infrastructure.
- no_wizard 7y agoBased on what data is that true exactly? Opinions are fine, I don’t like CoffeeScript and never have. It’s no justification to shame someone’s choices when perfectly well working code is usable via what appears to me to be a healthily maintained tool. Less popular? Sure. Would I reach for it to start a new project? no. Calling it dead though and saying it’s only around because it’s “legacy” and only was used by “cool IT juniors” is shaming a legitimate choice without giving any context or data to back up the assertions