Live data from Hacker News

Civet: A Superset of TypeScript

civet.dev

81–90 of 237 posts

Re: Civet: A Superset of TypeScript

#81
post #33
post #8

Really redminds me of coffeescript, lots of special syntax that doesn't really help readability? I have a hard time understanding the motivation of this project other than syntactic sugar-maxxing JS/TS.

Languages like this don't make sense anymore. You can just pick a mature, feature-rich language you like (Rust, Kotlin, Python, probably many more) and transpile to JS.

Or compile to wasm

Re: Civet: A Superset of TypeScript

#82

The pattern matching (TC39 stage 1) and pipeline operators (TC39 stage 2) look great, and I'd love to have those in TypeScript. It will probably take a loooong while for those features to be available in JavaScript, but I feel like I can live without those for now :-). Fwiw it seems a lot of people really like the concept of "significant indentation". I'm thinking Python, YAML, Godot's GDScript. Not a lof of language…

Note that the pipe operator is the rejected tacit pipes from TC-39. TC-39 made the (IMO) wrong choice of what they call hack style pipes (with a mandatory token) where instead of the pipe being a simple way to call unary functions. Civet seems to have picked the better pipes.

Re: Civet: A Superset of TypeScript

#83
post #68

Things I like: - Everything is an expression - Async imports just work without thought - Yaml-like object structuring - JSX improvements - Multi-line string literals without leading whitespace Things I’m on the fence about: - Pipe operators (better than .pipe I guess?) - Pattern matching (love it in Scala and swift, but this doesn’t feel done right) Things I loathe: - Signifiant whitespace (removing brackets in gener…

Not a fan of YAML at all myself, but it's interesting that you like 'Yaml-like object structuring' yet then loathe 'Signifiant whitespace'? I mean that's basically YAML.

Re: Civet: A Superset of TypeScript

#84

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

CoffeeScript was great. It was vastly more pleasant to code in than ES5-era JS. Once ES6 came out, we simply migrated to it and moved on.

Re: Civet: A Superset of TypeScript

#85
post #18

Earlier quoted context omitted.

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.

What makes Civet more likely to drive that innovation than TC39 proposals themselves?

We ship

Re: Civet: A Superset of TypeScript

#87
post #80
post #77

Earlier quoted context omitted.

The GWT approach has its own downsides as well.

A) GWT is 20 years old and not similar to how modern transpilation works B) What are the downsides?

The built in browser debugger is incredibly good. As long as the transpilation is simple and matches JS semantics you can still use the debugger. I haven't seen good debugging tools when using languages more distant from JS but I'd love to know if they've become viable.

Re: Civet: A Superset of TypeScript

#89

The industry has deemed those languages completely unnecessary when we migrated away from coffeescript. Syntactic sugar can’t be the only thing that makes a programming language.

C is syntactic sugar on top of assembly

C++ was, for a long time, syntactic sugar on top of C

Re: Civet: A Superset of TypeScript

#90
post #78
post #34

So make sure you introduce this in your company; become the subject expert in it, invite everyone to very cool sessions demonstrating how cool it is, and secure your job until the next rewrite! Looking at the examples, 1/5th of it looked neat, which probably would be best to submit a proposal for |> to the typescript committee rather than write another alienation. This is a solution looking for a problem to solve. It…

> It introduces an alternative and does so as a superset; which is not only dangerous to existing code bases... How so?

An alternative way to do something in a code base, for no other reason than style, is a recipe for technical debt. It builds up a larger cognitive load on the developers navigating and working the code base and induces more chances of bugs via half-refactors, or half-considerations.

As for the superset comment, I meant that if you introduce a completely different language, you probably have a valid reason; e.g. it does something different. Adding to an existing language with a superset without any need for it is also dangerous. It's not like it's a DSL at a higher level helping people get repetitive or scriptable things done faster. It's only an alternative, leading people down rabbit hole and second guessing with a lot more to remember.

Post reply on HN