Live data from Hacker News

CoffeeScript for TypeScript

civet.dev

41–50 of 143 posts

Re: CoffeeScript for TypeScript

#41
post #35
post #33

Earlier quoted context omitted.

Go's error handling pattern is a great example of being overly explicit IMO. I personally like it, but I can understand why it causes so much controversy.

I find that Go errs way too strongly on the explicit side, but overall it's still better than many other alternatives. For error handling I tend to write in a style where errors are either asserted out or "folded". If I do several operations in sequence any of them could err, I code in a way where I don't check every single op: instead I make some kind of "error accumulator", or write the code in a style such that if…

Yea but Go's solution to errors is a straight jacket. There's nothing in say Java that prevents returning a Result type with an error or value and writing code that way.

I guess you can panic/recover in go but it's very very unwieldy and not quite the same.

Re: CoffeeScript for TypeScript

#42
If you don't want to make the same mistake as me: don't ever choose to use a language whose syntax doesn't distinguish between variable assignment and variable declaration. Yes this includes coffeescript. This seems optional in civet [1].

[1] https://civet.dev/cheatsheet#variable-declaration

Re: CoffeeScript for TypeScript

#44

Not the first time I see the proposed pipe operator syntax but oh my god, did they have to make it so messy? data |> Object.keys |> console.log when you could have done |> data Object.keys console.log Or even better, don't introduce new syntax and just make it a simple function instead |>(data, Object.keys, console.log)) Yes yes, I know "|>" is not a legal variable/function name right now, but also, why not?!

Cool idea, we might do that!

Re: CoffeeScript for TypeScript

#48

If I were going to do this, I’d probably go all the way to using ReScript, but it’s a nice idea. I’m quite surprised it’s not called ToffeeScript though.

+1 for tofeescript. 'Civet' certainly implies your code is being processed, but I'm not sure the connotation is desirable. And all IMHO of course, but significant-whitespace is the worst idea ever.

Civets, they're nature's transpilers.

Re: CoffeeScript for TypeScript

#49
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.

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.

Re: CoffeeScript for TypeScript

#50

If I were going to do this, I’d probably go all the way to using ReScript, but it’s a nice idea. I’m quite surprised it’s not called ToffeeScript though.

+1 for tofeescript. 'Civet' certainly implies your code is being processed, but I'm not sure the connotation is desirable. And all IMHO of course, but significant-whitespace is the worst idea ever.

> I'm not sure the connotation is desirable.

You'd think not, and yet ...

Post reply on HN