Live data from Hacker News

Civet: A Superset of TypeScript

civet.dev

201–210 of 237 posts

Re: Civet: A Superset of TypeScript

#201

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

One of the Civet devs here. To me, the main benefit of Civet is the ability to rapidly add useful features to the language, while preserving all the benefits of TS (tooling, etc.). We're constantly coming up with ideas — from TC39 proposals, other languages, or general brainstorming — and implementing them quickly. For example, we recently added pattern matching when catching exceptions, which took just a couple of h…

Coming from Ruby and Elixir, Civet adds a lot of things I miss from those languages.

I still have gripes about runtimes such as Nodejs, but I don't expect something like Civet to solve those.

Re: Civet: A Superset of TypeScript

#202
post #26

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 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 I don't think it was a bad idea in hindsight. JS of the era was a pain to use; CoffeeScript made writing and reading things much easier, which is the reason it took off. Since then things changed and many "CoffeeScript features" are now "JavaScript features". Only with knowledge…

> JS of the era was a pain to use

Was it really?

Outside of arrow functions, I don't really think CoffeeScript had a single important idea. And even then, the aversion to the `function` keyword in the JavaScript community never fails to make me laugh. Sure, sometimes the implicit scoping of the arrow function is nice, but man.

Re: Civet: A Superset of TypeScript

#203

I really, really dislike the Elixir/Ruby style of optional parentheses. Explicit is better than implicit! I also absolutely cannot parse this, and while I'm open to the idea that eventually this would become readable, right now this just looks like word salad: value min ceiling max floor

Yeah I agree, 'value min ceiling max floor' is a terrible example. Especially when making a case for improving readability. That being said; regular written language (like in a book) has optimal readability. Therefore it makes sense for programming languages to lean towards that. If you could write code like: `draw 600 by 600 graph_of intersection_of data_set1 data_set2 in blue` it would be very easy for basically an…

The problem with written language is that there's an inherent level of ambiguity. Now, this is fine for stuff read by humans, as we're pretty good at resolving that ambiguity using context and our own personal experience. Computers, however, are not good at ambiguity. They require explicitly defined syntax, as they just can't handle the ambiguous nature of natural language (at least, not without a shitload of processing power for a LLM)

Now, there's no reason we can't have an explicitly defined syntax that reads like normal written language. That's what SQL tries to do, after all. However, explicitly defined "natural" language has the tendency to get very unnatural very quickly. Human language is fluid and evolving in a way that a programming language just can't be. And no amount of emulating written language can eliminate the need to learn a programming language's syntax.

Re: Civet: A Superset of TypeScript

#204

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

One of the Civet devs here. To me, the main benefit of Civet is the ability to rapidly add useful features to the language, while preserving all the benefits of TS (tooling, etc.). We're constantly coming up with ideas — from TC39 proposals, other languages, or general brainstorming — and implementing them quickly. For example, we recently added pattern matching when catching exceptions, which took just a couple of h…

It's fun and valuable to have a place to land proposals and try them out early (seems like TS itself should have flags for this though). The problem is that as the proposal is refined, or if it is rejected, it implies constant changes to your language, which will basically drive away anyone who's not experimenting around for fun in the same mindset as you. Could be good or bad, although managing the flux might be tricky even so.

The addition of quick things you whipped up in a couple of hours seems like it'll make the rate of changes impossible to handle. It's unlikely almost by definition that the change you whipped up quickly will stand the test of repeated use and further experience unmodified.

All that said, it's a super fun thing to do, and hats off for such an ambitious project. If nothing else, writing a parser, transpiler, etc. is impressive and fun work, and will undoubtedly enable/force you to learn all the javascript/TS quirks and details extremely well! :-)

Re: Civet: A Superset of TypeScript

#205

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.

I still use CS for prototyping. It's easy to write and what's most important it's easy to read due to lack of visual clutter of JS. Once I have something decent I just take JS output and annotate it with types and work on it further debugging and optimizing.

Re: Civet: A Superset of TypeScript

#206
post #100

This is terrible. I was so happy CoffeeScript died a quiet death. Now someone thinks of this. Keep it simple. Code should be easy to read. Also, ain't nobody got time to learn yet another obscure abstraction that will add only a marginal productivity gain at best (and probably sacrifice readability + add another build step + add another learning curve to new devs in the process).

CoffeeScript immediately revolted me and Civet is giving me the same heebie jeebies. It's the kind of punctuation-as-code that the world rejected 10+ years ago when Perl faded away. Verbose code is better for readability and readability is 100X more valuable that faster typing. It's not more expressive, it's more obscure.

Re: Civet: A Superset of TypeScript

#208
post #26

Earlier quoted context omitted.

> 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 I don't think it was a bad idea in hindsight. JS of the era was a pain to use; CoffeeScript made writing and reading things much easier, which is the reason it took off. Since then things changed and many "CoffeeScript features" are now "JavaScript features". Only with knowledge…

> CoffeeScript made writing and reading things much easier My point is that it kinda didn't. It looked prettier on the surface, but didn't actually solve any of the deeper problems of writing JavaScript. To write CoffeeScript you had to still know JavaScript and all its oddities. TypeScript solved those problems, and that's why it has taken off and had a meteoric rise to the point that it's practically synonymous wit…

> TypeScript solved those problems, and that's why it has taken off and had a meteoric rise to the point that it's practically synonymous with JavaScript.

It's also backed – nay, pushed – by one of the largest and most successful tech companies in the world. A company that also made a point of releasing a very capable IDE to go along with it. Surely this has had some impact on its meteoric rise? :o)

(Wait – aren't meteors falling?)

Re: Civet: A Superset of TypeScript

#209
post #187

Earlier quoted context omitted.

My biggest gripe with CoffeeScript, beyond it's scoping being madness [1], is it made writing very inefficient JavaScript much easier. The language was full of footguns. Many times something would look perfectly reasonable in CoffeeScript but when you would actually read the JS it would be iterating the same dataset multiple times to grab individual items that could have and should have been a single loop. 1. https:/…

It's the Hibernate problem all over again. Any time one language is layered on another, the user is totally unaware of the degenerate cases that they are triggering, and the higher language is usually blocked from fixing those. Similar to C++ preprocessors which generated poor C.

You just about need some sort of ast optimizer or some such.

Re: Civet: A Superset of TypeScript

#210
I personally would love for 90% of these features to make it into TypeScript and eventually be ECMAScript standards. This is a taste of the world we could have, I don't understand all the hate towards this project.

Kudos to all building & contributing to this!

Post reply on HN