This is not the “TypeScript of C” but rather the “CoffeeScript of C”. I think the most important factor in TypeScript adoption is that it does not change JavaScript (except for a few small extensions) — you can remove the TS part and what’s left over is valid JS.
(To be clear, I liked CoffeeScript! But it became a dead end when JS absorbed its features without its syntax.)
The syntax seems a bit strange to me, but I guess that’s a personal taste. I do think the choices that were made in the Odin language are a much cleaner approach.
TypeScript re-opened a flavor of language development that had disappeared for a while: static weak typing. Except C already is the quintessential static weak typed language!
I guess the other way to think about it is TypeScript compiles to JavaScript and has basically no runtime, and fully accepts the JavaScript runtime. But the example code imports a library, so I’m guessing that’s not what this is either.
Take a very normal language like C, and then make it very unusual. I don’t think you’re likely to attract C fans - or most programmers - with something that is so stylistically strange.
I would love to see a TypeScript-like language targeting native code, but this isn’t it. I think the analogy to TS just means it’s transpiled to C, the way TS is to JS. (Nim also transpiles to C. Zig used to.)
I don’t think I like the language. It’s got some really weird syntax, like declaring a variable in the middle of an expression using an “!”, and the way a struct name means a pointer to the struct unless you follow it with a “.”. And the support for kebab-case, with the ensuing requirement to put spaces around operators, drive it farther away from C.
This is not the “TypeScript of C” but rather the “CoffeeScript of C”. I think the most important factor in TypeScript adoption is that it does not change JavaScript (except for a few small extensions) — you can remove the TS part and what’s left over is valid JS.
(To be clear, I liked CoffeeScript! But it became a dead end when JS absorbed its features without its syntax.)
The syntax seems a bit strange to me, but I guess that’s a personal taste. I do think the choices that were made in the Odin language are a much cleaner approach.
TypeScript re-opened a flavor of language development that had disappeared for a while: static weak typing. Except C already is the quintessential static weak typed language!
I guess the other way to think about it is TypeScript compiles to JavaScript and has basically no runtime, and fully accepts the JavaScript runtime. But the example code imports a library, so I’m guessing that’s not what this is either.
Take a very normal language like C, and then make it very unusual. I don’t think you’re likely to attract C fans - or most programmers - with something that is so stylistically strange.
I would love to see a TypeScript-like language targeting native code, but this isn’t it. I think the analogy to TS just means it’s transpiled to C, the way TS is to JS. (Nim also transpiles to C. Zig used to.)
I don’t think I like the language. It’s got some really weird syntax, like declaring a variable in the middle of an expression using an “!”, and the way a struct name means a pointer to the struct unless you follow it with a “.”. And the support for kebab-case, with the ensuing requirement to put spaces around operators, drive it farther away from C.