Live data from Hacker News

Civet: A Superset of TypeScript

civet.dev

11–20 of 237 posts

Re: Civet: A Superset of TypeScript

#11
Civet reminds me of Coffeescript but now in TypeScript.

This has made me even more convinced that the future of JavaScript is JavaScript.

We will be seeing JavaScript (natively) having all the types, features and proposals that TypeScript has and the industry will eventually move on from TypeScript.

Re: Civet: A Superset of TypeScript

#15
post #5

That looks interesting but imo the syntax is too terse. Coming from Rust and Golang I very much appreciate the use of sigils and syntax sugar in moderation but especially the pipe operators look like they could lead to hard to debug code very easily.

You get used to it. It's really nice in Elixir. I'm not a fan of the fat pipe though.

Re: Civet: A Superset of TypeScript

#17
The JSX seems compelling. You are already doing a non-standard HTML embedding HTML into javascript, why not do it better? https://civet.dev/reference#jsx

I am not convinced that all the syntax nicety is necessary, but improved pattern matching is often a great thing. On the other hand their examples seem to be to pattern match on highly dynamic types, which you can avoid 95% of the time with TypeScript.

Re: Civet: A Superset of TypeScript

#18

Civet. Kopi luwak coffee. It's CoffeeScript. I wrote a bunch of CoffeeScript back in the day, and everyone I've spoken to about it feels the same, that it was a bad idea in hindsight, and a language dead end. The language was only syntactic sugar, and by not bringing anything else to the table, was unconvincing for ports and support in other ecosystems. It now seems that most codebases have been decaffeinated though.…

I think everyone mostly agrees that CoffeeScript was a dead end, but I think it drove at lot of innovation at the time. Hopefully Civet can do the same, even if it ends up being another dead end.

Re: Civet: A Superset of TypeScript

#19
post #10

Am I the only one that really dislikes the syntax choices here?

Having worked in Rust I love the pattern matching proposal. Having dabbled in Swift I like the single argument function part (though keep the brackets, please)

Much of the rest I could take or leave… but then is that just because I’m not familiar with them? Stuff like the pipe operator makes sense to me but it reminds me of .reduce(): there are a few legitimate uses of it but the vast majority will be entirely-too-smart—for-its-own-good show off coding.

Re: Civet: A Superset of TypeScript

#20
Some of these seem good to me:

- "everything is an expression" is a nicer solution for conditional assignments and returns than massive ternary expressions

- the pipe operator feels familiar from Elixir and is somewhat similar to Clojure's threading macros.

- being able to use the spread operator in the middle of an array? Sure, I guess.

I want to like the pattern matching proposal, but the syntax looks slightly too minimal.

The other proposals are either neutral or bad, in my opinion. Custom infix operators? Unbraced object literals? I'm not sure that anyone has a problem that these things solve, other than trying to minimize the number of characters in their source code.

Still, I'm glad that this exists, because allowing people to play with these things and learn from them is a good way to figure out which proposals are worth pursuing. I just won't be using it myself.

Post reply on HN