How we failed, then succeeded, at migrating to TypeScript
1–10 of 60 posts
Re: How we failed, then succeeded, at migrating to TypeScript
#2Reading my old code, I was surprised by how clean it looks. How easy it is to digest. There is a certain sense of calm when your brain doesn't have to process all the visual clutter of a C-style syntax. I miss that.
I wish I didn't have to choose between CoffeeScript and TypeScript.
TypeScript first and foremost is about type safety and tooling. Its architecture is largely syntax-agnostic. It operates on the AST, so the parser and code generator can be swapped for a different syntax.
CoffeeScript is all about syntax and does not (and should not) concern itself with most of the semantics.
They could theoretically be used together if TypeScript simply allowed custom parsers/generators/formatters to be plugged in.
This would work with ESLint and other JS tooling as well. I did a POC on that a few years ago [0].
[0] https://github.com/gkz/LiveScript/issues/821#issuecomment-18...
Re: How we failed, then succeeded, at migrating to TypeScript
#3I was looking at some of my old repos today. Enjoyed the nostalgia. Lots of CoffeeScript there. I had to switch to ES and then TypeScript because CoffeeScript was abandoned at the time and I was stretched over other projects to be able to help maintain it. Reading my old code, I was surprised by how clean it looks. How easy it is to digest. There is a certain sense of calm when your brain doesn't have to process all…
I really miss the elegance of Coffeescript. ES6 is great, Typescript is great, but sometimes I feel like I have to visually parse a lot of static cruft to read the essence of the program.
What if one's editor had a toggle hotkey to hide typescript typings. Maybe you could turn it off to visually parse the program real quick, before turning it back on to edit it.
Hmm...
Re: How we failed, then succeeded, at migrating to TypeScript
#4I was looking at some of my old repos today. Enjoyed the nostalgia. Lots of CoffeeScript there. I had to switch to ES and then TypeScript because CoffeeScript was abandoned at the time and I was stretched over other projects to be able to help maintain it. Reading my old code, I was surprised by how clean it looks. How easy it is to digest. There is a certain sense of calm when your brain doesn't have to process all…
You just gave me an idea.. because we've shared a similar experience. I really miss the elegance of Coffeescript. ES6 is great, Typescript is great, but sometimes I feel like I have to visually parse a lot of static cruft to read the essence of the program. What if one's editor had a toggle hotkey to hide typescript typings. Maybe you could turn it off to visually parse the program real quick, before turning it back…
Re: How we failed, then succeeded, at migrating to TypeScript
#5Any tips/thoughts??
Re: How we failed, then succeeded, at migrating to TypeScript
#6I was looking at some of my old repos today. Enjoyed the nostalgia. Lots of CoffeeScript there. I had to switch to ES and then TypeScript because CoffeeScript was abandoned at the time and I was stretched over other projects to be able to help maintain it. Reading my old code, I was surprised by how clean it looks. How easy it is to digest. There is a certain sense of calm when your brain doesn't have to process all…
I’ve not had this experience. I’ve found the ambiguity in coffeescript a maddening adventure in syntax confusion.
- function call syntax doesn’t need parens except if a 0 parameter method
- commas are largely optional both in arrays and function parameters. How do you parse: [f, f(), f a b c]
- implicit returns are a terrible idea.
- the @ syntax refers to either a ‘static’ method or an instance variable depending on the context.
- I have to do a double take for the object literal syntax every time
Re: How we failed, then succeeded, at migrating to TypeScript
#7I was looking at some of my old repos today. Enjoyed the nostalgia. Lots of CoffeeScript there. I had to switch to ES and then TypeScript because CoffeeScript was abandoned at the time and I was stretched over other projects to be able to help maintain it. Reading my old code, I was surprised by how clean it looks. How easy it is to digest. There is a certain sense of calm when your brain doesn't have to process all…
Re: How we failed, then succeeded, at migrating to TypeScript
#8Earlier quoted context omitted.
You just gave me an idea.. because we've shared a similar experience. I really miss the elegance of Coffeescript. ES6 is great, Typescript is great, but sometimes I feel like I have to visually parse a lot of static cruft to read the essence of the program. What if one's editor had a toggle hotkey to hide typescript typings. Maybe you could turn it off to visually parse the program real quick, before turning it back…
You're getting in the realm of "projectional editing." It's a fascinating idea: https://news.ycombinator.com/item?id=15534555
Re: How we failed, then succeeded, at migrating to TypeScript
#9We’re now considering switching from coffeescript to ES6 (or maybe also Typescript). But coffeescript is seeing a bit of a revival, and I’m starting to wonder if we should stick with it?? Tooling seems a bit behind and also lacking things like tree shaking etc (??). But coffeescript is so clean and fun... Any tips/thoughts??
I’d switch and I wouldn’t look back. I did switch my focus of learning and use, albeit from Ruby and Kotlin (which is better than nothing but nominative typing is insufficient IMO) to TypeScript, and it was among the best decisions I’ve made in my professional career.
Re: How we failed, then succeeded, at migrating to TypeScript
#10We’re now considering switching from coffeescript to ES6 (or maybe also Typescript). But coffeescript is seeing a bit of a revival, and I’m starting to wonder if we should stick with it?? Tooling seems a bit behind and also lacking things like tree shaking etc (??). But coffeescript is so clean and fun... Any tips/thoughts??
There’s some learning around how to type things, but not too hard and very worth it. Need at least one teammate / leader who has used c++/java/c#/etc. extensively on large codebases to mentor others.
Teams of one, es6 is fine, typescript setup is probably overkill, especially for an mvp.