Live data from Hacker News

Civet: A Superset of TypeScript

civet.dev

151–160 of 237 posts

Re: Civet: A Superset of TypeScript

#151
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).

I'm not convinced this is a good idea either, but abstractions and syntax are what makes people love or hate a language. I enjoy writing python over JS because of ergonomics. Its not really about productivity, its about being happy when writing and reading code.

That being said, stapling on a compile step maybe isn't the answer.

Re: Civet: A Superset of TypeScript

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

It’s interesting in this example that the docs try to show that a for loop is useful, when there’s already an idiomatic approach here:

``` const result = items.map( i => i.length ? i.toUpperCase() : ‘’) ```

I think things get interesting here when different kinds of iterators come into play (eg generators, async-await for loops, non-array iterables). Shame the landing page doesn’t touch on that at all.

Re: Civet: A Superset of TypeScript

#154

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

That’s part of what C does, but it’s not the only thing.

Assembly adds mnemonics and a logical structure to machine code.

C largely does the same, but adds a cross-platform abstraction, mechanisms for organizing and sharing source code, a standard library, and various other things.

Re: Civet: A Superset of TypeScript

#155

Earlier quoted context omitted.

I do not particularly like the lack of brackets everywhere. I think it is hard to know precedence perfectly and brackets ensure you do not make stupid mistakes. Also there is the classic issue where you take an if statement that has a line one expression and you add a second line, but now because it didn't have brackets (and you are not using indentation style), you just introduced a bug. Or you have an if statement…

But we are using indentation style; that's one of the major design principles. In Civet, the body of an "if" can be multiple lines, and it's clear (from indentation) what they're nested under. Also, the body of an "if" statement can be empty, so if you comment out the body, the "if" doesn't apply to anything else. (This is an improvement over Python, which requires non-empty bodies, even if just to say "pass".) I thi…

Sorry, I did misunderstood. I apologize and thanks for the clarification.

I didn't realize Civet is indentation-based like Python. That isn't so bad.

Re: Civet: A Superset of TypeScript

#156

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

The new intern or you in a year reviewing your own code.

Re: Civet: A Superset of TypeScript

#157
Since Typescript I wanted a Coffeescript with gradual typing. But I'm not sure if Civet isn't going to far into foreign syntax and shorthands for many things.

It probably won't share fate of Coffeescript. It won't get popular, influence TS and JS and fade into obsurity due to mostly fulfilling it's goal. I'm afraid it won't get popular enough to do that.

Re: Civet: A Superset of TypeScript

#158

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

It was a wonderful idea that got 90% assimilated by the underlying language thus becoming successfully obsolete.

Re: Civet: A Superset of TypeScript

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

If you don’t understand the code code completion becomes cargo cult programming.
Post reply on HN