Live data from Hacker News

CoffeeScript for TypeScript

civet.dev

111–120 of 143 posts

Re: CoffeeScript for TypeScript

#112
post #26

Way 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…

We also had same experience with cofeescript. It was a not a nice experience. Later we move with JS because of maintenance issues.

Re: CoffeeScript for TypeScript

#114
post #26

Way 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…

Reading CoffeeScript, and this Civit language, feels like reading prose that doesn't have any punctuation. Slightly quicker to write, much harder to read.

Re: CoffeeScript for TypeScript

#115
post #26

Way 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 that I'm going to get confused constantly.

Why would I care about writing `export a, b from "./cool.js"` instead of `export { a, b } from "./cool.js"`? I don't mind those curly braces, I may actually like them a bit; I do very much mind the overhead of remembering these details when I change languages, and there's no way I can remove JS/TS from my life.

Finally, there's expressions like `value min ceiling max floor`. Is that readable at all? You have to actually read each word to know which are operators, which functions, which vars... It seems to me much worse than `max(min(value, ceiling), floor)` or a Lispy alternative like `(max (min value ceiling) floor).

Re: CoffeeScript for TypeScript

#116
post #26

Way 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…

I didn't mind the coffeescript experience, but it's deeply hurtful to productivity to dev in a platform that doesn't end up winning.

CoffeeScript did end up winning though, all of its important features ended up in the next Javascript spec. It was a bit sad to transition into the slightly less aesthetic next Javascript release, but it also felt triumphant. To me it feels like the CoffeeScript community won. Every time I type some Javascript that's actually not fragile and not absolute garbage, I remember it's because we as a community backed CoffeeScript, and that led to the browsers listening and adding its features to Javascript.

I am certain we're doing the same thing now with Typescript.

Re: CoffeeScript for TypeScript

#117
I'm slightly surprised no one has commented on the custom infix operators. I think if I encountered the example in the wild, I'd understand it was a clamp function based purely on the names, but if it were used for anything else I'd have to spend quite a lot of time puzzling over it. Perhaps they make more sense to Haskell people, though!

Re: CoffeeScript for TypeScript

#118
Given that JavaScript syntax evolution seems to have stalled again (a decade of proposals for bind operator?) I feel like I know why languages like this are appearing, having written quite a bit of swift and kotlin recently, JavaScript really would benefit from shipping bind syntax.

Re: CoffeeScript for TypeScript

#119
It might be me but "expressive syntax" does not automatically translate to any metric of productivity or "fun". Especially not in a job, where we put most of our work time into reading, researching, searching, conception and discussions. Only a fraction of my work time consists of "actually typing in some form of syntax".

I for one appreciate simplicity and would prefer Clojure anytime over Scala. The further comes with barely any syntax, has a couple of quick-to-grep concepts and once you trained your brain to read it and your editor to juggle the parens it is a lot of fun. The latter looks very nice and casual in the beginning but to me feels like a rabbit hole of complex concepts that were always heavier than the domain I was using it for. YMMV.

Tho civet code examples look nice I'm afraid it adds much more complexity than needed, both the concepts you have to keep in your brain's working memory and the whole TS toolchain which is already kind of horrible these days.

Re: CoffeeScript for TypeScript

#120
"Experimental Typescript" is a nice way to look at this. There are some great ideas (opinions?) in there and some terrifying ones (imho). I can literally see the bear traps waiting to take the legs off of our junior/mid devs. But if this sparks TS to up its game I think some of the sharpest edges in Civet might be left safely as opinionated experiments while the best edges make it into the lang. +1 @Yahivin great project.
Post reply on HN