please just use rescript it addresses every problem with js/ts and is simpler and you get a sound type system please.
I took a look at rescript's facillities for migration from JS and at step 1 ( https://rescript-lang.org/docs/manual/latest/converting-from... ), it tells you: > First, copy the entire file content over to a new file called src/Main.res by using our %%raw JS embedding trick: > %%raw(`const school = require('school'); etc. `) I stopped reading there - I'm sorry but that is horrifying. Wrapping JS in in a big backtick s…
CoffeeScript for TypeScript
131–140 of 143 posts
Re: CoffeeScript for TypeScript
#132Earlier quoted context omitted.
Yeah, I like a lot of the language features here, especially: - Everything is an expression - Pattern matching - Spread in any position - Dedented strings/templates However, I wouldn't use it, because the chance of it becoming abandonware that I just have to migrate off of later is way too high. I'll write a few extra TypeScript characters here and there for the stability.
Unless civet's compiled output is hard to read you could always just check in the compiled Typescript source and continue from there if it gets abandoned. Not much of a risk when the migration is built in by the way the tool works in normal use.
Re: CoffeeScript for TypeScript
#133The CTO in me is horrified at the idea of writing a whole bunch of civet code for it to die a coffeescript style slow death. If it catches on I'll be all over it though.
Re: CoffeeScript for TypeScript
#134Re: CoffeeScript for TypeScript
#135The greatest thing about this thread is that I realize I'm not alone in my nostalgia for coffeescript.
Re: CoffeeScript for TypeScript
#136Re: CoffeeScript for TypeScript
#137Way back in the early 2010s I was very "excited" about coffee script and similar projects. They sounded like they should be great for productivity. When I actually tried to write a project in coffee script, the results were the opposite of what I expected. The code was harder to read, harder to modify, harder to understand, harder to reason about. There's something about removing stuff from syntax that makes programm…
> Being terse is good, up to a point. Same with being explicit. I'm thinking of using Civet for an upcoming project, I specially want `do` expressions. Even with how much noise an IIFE (`(() => {doStuff(); return ...;})()`) introduces, it's such a natural idea to me that I end up using them very often. But what makes me question the idea is having to learn a new syntax that is close enough to the JS I already know th…
Re: CoffeeScript for TypeScript
#138I'm not sure if getting some extra syntactic sugar is worth adopting a whole other language into a codebase: at least, that seemed to be one of the lessons from CoffeeScript.
Do you like writing this everywhere? var that = this; function() { ... } Back when there was no async/await and no promises, passing callbacks like this was extremely tedious, and node.js had a lot. CoffeeScript was worth using for the fat arrows alone. CoffeeScript didn't die. JavaScript (ES3/5) died and we are all using CoffeeScript now!
Re: CoffeeScript for TypeScript
#139Re: CoffeeScript for TypeScript
#140Earlier quoted context omitted.
Is it? I find most of the "winning" tech deeply unproductive. Have you tried developing in a project with Webpack and Redux? It's kind of its own little hell. Everything is way too slow and complicated. Tasks that should take 20 minutes take 3 hours.
Try again with Vite and useReducer and prepare to have your socks blown off.