3 ms·
Contrary to the last line, this seems to me very different from "for Python what TypeScript made for Javascript". Typescript is an extension of Javascript; any
by gjm11 5y ago
Contrary to the last line, this seems to me very different from "for Python what TypeScript made for Javascript".
Typescript is an extension of Javascript; any legal Javascript program is a legal Typescript program; Typescript adds notation for specifying types, and various other things. Its syntax is about as similar to that of plain ol' Javascript as it could be given the extensions it adds.
This thing you have here doesn't look at all like a backward-compatible extension of Python. It's full of {} meaning something unrelated to sets or dictionaries, and [] meaning something unrelated to lists or indexing, and ! introducing ... shell syntax or something?, and some suffix-asterisk notation meaning I don't know what.
None of that means it's bad (though it looks very much not to my taste). But if this is to Python as TypeScript is to Javascript, then I think it needs a lot of explanation of how.
(Also, is this ... just a bunch of pseudocode you wrote down and would like some day to have something that interprets? Or code that is actually understood by something you've written? Or code conforming to a spec you've written but not made an implementation of? Or what?)