Live data from Hacker News

Civet: A Superset of TypeScript

civet.dev

141–150 of 237 posts

Re: Civet: A Superset of TypeScript

#141
post #108

Its not about how concise or short your code looks, its how about much time the new intern coming tomorrow needs to understand those 1000 line files. I find the syntax very hard to remember and confusing

And in times of Copilot & others writing become less and less a problem, as code completion works very well. Like this example: https://civet.dev/#everything-is-an-expression `items = for item of items`, in js you type `for`and copilot wrote nearly the full correct for-code. So you have to type not much and can read it easy.

From my experience, I predict that LLM code completion will not work very well when using a language like Civet.

Copilot is good when working with something where the idiomatic patterns are common, widespread, and hard to screw up. Civet has low adoption, uses much looser syntax (bracing, whitespace), and lacks the rigor of common TypeScript code.

Re: Civet: A Superset of TypeScript

#142

i used to write ruby, this reminds me of a js ruby it was about a decade ago and i liked ruby for the implicit nature and minimal looking code— without the curly braces and shorthand notation whenever possible return true unless false that line is roughly why i favor curly braces and javascript’s control flow lines like return true unless false are so easy to write in the moment, but so much to reason about it post.…

I came to the same conclusion after the initial perl intoxication. Stable, regular constructs are much easier to parse and get back to than this pseudo-natural language. My worst confusion is python’s truly unreadable “x if cond else y” construct, especially when x and y are non-trivial. Putting a condition in between is not smart. Oh, now this gets me started on “is not”! Keeping calm…

Re: Civet: A Superset of TypeScript

#143
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…

I never wrote enterprise apps in it but the short syntax and arrows made it easier to prototype/ reason with it.

It probably died fueling the whole js build/transpiler landscape that is in use today.

Re: Civet: A Superset of TypeScript

#144

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…

I'll pass on the pipe operator, but it's not particularly objectionable. Agree there's some good ideas. Pattern matching looks like a great idea with the wrong syntax - let's just get a match statement similar to the switch statement - if we can't reuse switch. String dedent and chained comparisons look nice. Though I think the latter is a breaking change if it were done in js. I'd also be fine with default const for…

Using the pipe operator in Elixir is very nice, even more so for building up complex multi operations and such

Re: Civet: A Superset of TypeScript

#146
post #131

Earlier quoted context omitted.

That approach only makes any sense if you have broadly compatible semantics; otherwise execution will pay a heavy penalty (CPU usage, memory usage, bundle size). And let me tell you, your “Rust, Kotlin, Python, probably many more” don’t transpile to JS well. If you genuinely mean transpiling as distinct from compiling , I think you could even reasonably say that it’s simply not possible for many languages due to fund…

I should have referenced compiling to Wasm as well, which is what languages with very different semantics to JS (like Rust, the CLR family, and the JVM family) all do.

If you do mean more generically targeting the web, then I recommend avoiding the word “transpile”, which will be understood to be something far more restricted in scope.

Re: Civet: A Superset of TypeScript

#148
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…

> JS of the era was a pain to use; CoffeeScript made writing and reading things much easier It didn't. Anything you learn / are familiar with will be easier to write - Coffescript was easier to write for people who learned Coffescript. Which in hindsight wasn't time well spent as they would've eventually had to bite the bullet anyway & just learn JavaScript like everyone else. JavaScript is much much easier to write…

Around 2012, I had sunk several years into becoming extremely familiar with JavaScript when I switched onto a team which was using CoffeeScript. I immediately liked it: it addressed some of the things I'd always found irritating about JavaScript, and I found it very easy to pick up. I was not a Ruby or even Python user at that time, so that didn't influence my decision either.

But you're right that you did have to know enough JS to understand what CoffeeScript was doing under the hood when things went wrong.

Re: Civet: A Superset of TypeScript

#149

Its not about how concise or short your code looks, its how about much time the new intern coming tomorrow needs to understand those 1000 line files. I find the syntax very hard to remember and confusing

yea this

i see it as moving physical abstraction into mental abstraction

save few lines of code but costs more mental ram

Re: Civet: A Superset of TypeScript

#150

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 very successful, the main win was that it could become irrelevant because so many constructs were adopted upstream.
Post reply on HN