Civet: A Superset of TypeScript
121–130 of 237 posts
Re: Civet: A Superset of TypeScript
#122Re: Civet: A Superset of TypeScript
#123Earlier 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…
Perhaps, but IMO that will then be because it looks tempting at first glance like YAML. No matter how much Python I write, I never learned to enjoy this and the fact that I can't select inside/around brackets to quickly manipulate a scope is just so frustrating.
Re: Civet: A Superset of TypeScript
#124Am I the only one that really dislikes the syntax choices here?
I feel like there is a specific kind of person that likes all this, and there is very little overlap between those people and the people that choose to use Typescript. Kinda feels like someone was forced to work in Typescript and really wanted to scratch their own itch.
Re: Civet: A Superset of TypeScript
#125I like some of it, but that’s hardly worth the increase in complexity.
In fact, having fewer aesthetic syntax choices is probably more of an improvement — cuts down on pointless/superficial coding style arguments, and leaves code generally more readable.
Re: Civet: A Superset of TypeScript
#126 operator {min, max} := Math
value min ceiling max floor
At least make them require a certain symbol at the start or something.Re: Civet: A Superset of TypeScript
#127Earlier 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…
Convenience does matter. The less I have to think about nonsense like that, the more I can think about actually writing correct code.
CoffeeScript wasn't perfect in that sense either and had some nonsense of its own. That probably contributed to its demise as much as any thing else.
Re: Civet: A Superset of TypeScript
#128Re: Civet: A Superset of TypeScript
#129Earlier quoted context omitted.
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.
For the languages that target wasm instead, there are different debugging stories. Kotlin's is very good, Rust's is pretty immature.