Live data from Hacker News

Civet: A Superset of TypeScript

civet.dev

231–237 of 237 posts

Re: Civet: A Superset of TypeScript

#231
post #48

Earlier quoted context omitted.

For “everything is an expression” https://github.com/tc39/proposal-do-expressions may be of interest, though discussion seems to have paused.

The odd thing is that Civet includes both do expressions and everything is an expression. I'd be happy with either, but both seems like a bad idea.

Do blocks in Civet are mainly to provide shielded scopes (with local declarations). They're currently also necessary to handle declarations (const/let) in the middle of expressions, but hopefully they won't be necessary eventually - only when the user wants to shield scopes. They also have useful forms like `async do` that let you build Promises using await-style code.

Re: Civet: A Superset of TypeScript

#232

Earlier quoted context omitted.

You can have shadowing with explicitly declared variables. And there are languages that allow that, Rust to name one and I love that I can do that every time I use it.

I slightly misspoke. The issue was that you wanted shadowing, but because of the lack of declarations, some random inner variable could suddenly reference a variable with broader scope. For example, you might have an “x” in some inner loop within a function. Then later on, you’d add an “x” earlier in the function, not realizing that that name was used down below. Suddenly the inner loop is referencing that new variab…

Ah, I see, you are right. It's terrible behavior.

Re: Civet: A Superset of TypeScript

#233
post #228

Earlier quoted context omitted.

That’s certainly not true of Rust: Rust had a particular goal, easily recognised as worthwhile, which wasn’t possible with any existing languages. Everyone sensible agreed the language made a lot of sense, even if they weren’t sold on the practicality of its specific approach.

IIRC everyone was perplexed why Mozilla was spending time on what looked like a research/academic problem instead of focusing on Servo

I didn’t get involved with any of this stuff until mid-2013, but at the very least by then, it was well understood that Servo couldn’t reach its potential without Rust.

Re: Civet: A Superset of TypeScript

#234
post #228

Earlier quoted context omitted.

IIRC everyone was perplexed why Mozilla was spending time on what looked like a research/academic problem instead of focusing on Servo

I didn’t get involved with any of this stuff until mid-2013, but at the very least by then, it was well understood that Servo couldn’t reach its potential without Rust.

Just to quote Wikipedia:

> Rust began as a personal project in 2006 by Mozilla Research employee Graydon Hoare, named after the group of fungi that are "over-engineered for survival". Mozilla began sponsoring the project in 2009, and would employ a dozen engineers to work on it full time over the next ten years

So by 2013 it was already 7 years old. I very much doubt the original personal project was viewed as "a lot of sense" etc.

Re: Civet: A Superset of TypeScript

#235
post #234

Earlier quoted context omitted.

I didn’t get involved with any of this stuff until mid-2013, but at the very least by then, it was well understood that Servo couldn’t reach its potential without Rust.

Just to quote Wikipedia: > Rust began as a personal project in 2006 by Mozilla Research employee Graydon Hoare, named after the group of fungi that are "over-engineered for survival". Mozilla began sponsoring the project in 2009, and would employ a dozen engineers to work on it full time over the next ten years So by 2013 it was already 7 years old. I very much doubt the original personal project was viewed as "a lot…

You’ll always easily find plenty of people that will say “that makes no sense”. But of people that worked in these sorts of fields, I imagine that, from the very start, there would have been significantly more than average approval for its goals, even if you wouldn’t expect it to succeed (such endeavours normally don’t). The niche Rust was targeting from the very beginning was one that was known to be underserved, and known to be rather important.

Re: Civet: A Superset of TypeScript

#236

Earlier quoted context omitted.

> 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 problem I don't think TS removed any peculiarities of JS. It just forced you to actually learn them which JS and CS didn't do.

Regardless of one's opinion on duck typing, Javascript was like feeling out for ducks with your hands in the dark, typescript was like being able to see for the first time.

Re: Civet: A Superset of TypeScript

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

This sounds a bit like all design is just what you are accustomed to, which seems wrong.
Post reply on HN