This language is quite striking! TypeScript is a superset of JS but here we're going from the other direction. Make a language that is only the TypeScript extensions to JS, and drop all the JS parts. No Object (!!), no Date, TypedArray, RegExp, almost all the mainstays are gone. It's Java 1.0: static offsets and vtables. This feels like the beginning of TypeScript throwing its weight around. It has the momentum to su…
> Make a language that is only the TypeScript extensions to JS, and drop all the JS parts. So? Is there a reason left then to use Typescript instead of C or C++? I cannot think of one. Especially for education you better use a real language that will stay for more than 10 years at least. Microsoft is doing a great job taking over the Javascript community, and now this.., would love to see their hidden agenda. IMAO Ty…
Static TypeScript: A Static Compiler for the TypeScript Language
21–30 of 57 posts
Re: Static TypeScript: A Static Compiler for the TypeScript Language
#22This language is quite striking! TypeScript is a superset of JS but here we're going from the other direction. Make a language that is only the TypeScript extensions to JS, and drop all the JS parts. No Object (!!), no Date, TypedArray, RegExp, almost all the mainstays are gone. It's Java 1.0: static offsets and vtables. This feels like the beginning of TypeScript throwing its weight around. It has the momentum to su…
> Make a language that is only the TypeScript extensions to JS, and drop all the JS parts. So? Is there a reason left then to use Typescript instead of C or C++? I cannot think of one. Especially for education you better use a real language that will stay for more than 10 years at least. Microsoft is doing a great job taking over the Javascript community, and now this.., would love to see their hidden agenda. IMAO Ty…
Re: Static TypeScript: A Static Compiler for the TypeScript Language
#23Yes! I was waiting for this so long, Typescript is the most flexible typed OOP language and it's way more than just a JS successor.
Only that this subset has no objects and is therefore not a OOP language anymore (?)
STS has at runtime four kinds of unrelated object types:
1. a dynamic map type has named (string-indexed) properties that can hold values of any type; 2. a function (closure) type; 3. a class type describes instances of a class, which are treated nominally, via an efficient runtime subtype check on each field/method access, as described below; 4. an array (collection) type.
Re: Static TypeScript: A Static Compiler for the TypeScript Language
#24This language is quite striking! TypeScript is a superset of JS but here we're going from the other direction. Make a language that is only the TypeScript extensions to JS, and drop all the JS parts. No Object (!!), no Date, TypedArray, RegExp, almost all the mainstays are gone. It's Java 1.0: static offsets and vtables. This feels like the beginning of TypeScript throwing its weight around. It has the momentum to su…
> Make a language that is only the TypeScript extensions to JS, and drop all the JS parts. So? Is there a reason left then to use Typescript instead of C or C++? I cannot think of one. Especially for education you better use a real language that will stay for more than 10 years at least. Microsoft is doing a great job taking over the Javascript community, and now this.., would love to see their hidden agenda. IMAO Ty…
Re: Static TypeScript: A Static Compiler for the TypeScript Language
#25e.g. type casts are no-ops. Instead, every object access is type-checked at runtime. `any` still exists and for unions and complex types it still performs full lookup by name (instead of RTTI/tagged unions or such).
So it's not really a static language, but a cut-down JavaScript runtime that instead of optimizing objects with hidden classes at runtime, does similar thing with vtables ahead of time.
Re: Static TypeScript: A Static Compiler for the TypeScript Language
#26Earlier quoted context omitted.
> Make a language that is only the TypeScript extensions to JS, and drop all the JS parts. So? Is there a reason left then to use Typescript instead of C or C++? I cannot think of one. Especially for education you better use a real language that will stay for more than 10 years at least. Microsoft is doing a great job taking over the Javascript community, and now this.., would love to see their hidden agenda. IMAO Ty…
C++ is the biggest cancer in the industry. I can't really understand how people can easily say its name. A C++ programmer needs to understand not only language syntax but also underlying operating system and its internals. This is completely different job and therefore needs completely different expertise. I don't even want to mention hardware limitations, cpu architectures, etc. So, don't use C++. It is not mainstre…
I guess we have been using different platforms, so is the bubble of web development.
Just for your education, Python ML research, is just glue for GPGPU libraries written in C++, NVidia nowadays specifically targets their GPGPU designs to match C++ semantics, Apple, Google and Microsoft use C++ for their drivers, Metal shaders use C++, AAA game industry breathes C++, Fintech uses a mix of Java/.NET and C++, LLVM and GCC, the beloved FOSS compiler stacks are written in C++, AUTOSAR requires C++14, Arduino Sketch is actually C++,…
C++ might have a couple of flaws, not being mainstream is certainly not one of them.
Re: Static TypeScript: A Static Compiler for the TypeScript Language
#27Earlier quoted context omitted.
Only that this subset has no objects and is therefore not a OOP language anymore (?)
It does have objects: STS has at runtime four kinds of unrelated object types: 1. a dynamic map type has named (string-indexed) properties that can hold values of any type; 2. a function (closure) type; 3. a class type describes instances of a class, which are treated nominally, via an efficient runtime subtype check on each field/method access, as described below; 4. an array (collection) type.
Re: Static TypeScript: A Static Compiler for the TypeScript Language
#28This language is quite striking! TypeScript is a superset of JS but here we're going from the other direction. Make a language that is only the TypeScript extensions to JS, and drop all the JS parts. No Object (!!), no Date, TypedArray, RegExp, almost all the mainstays are gone. It's Java 1.0: static offsets and vtables. This feels like the beginning of TypeScript throwing its weight around. It has the momentum to su…
> Make a language that is only the TypeScript extensions to JS, and drop all the JS parts. So? Is there a reason left then to use Typescript instead of C or C++? I cannot think of one. Especially for education you better use a real language that will stay for more than 10 years at least. Microsoft is doing a great job taking over the Javascript community, and now this.., would love to see their hidden agenda. IMAO Ty…
If something gets typed as `any` all bets are off and there are no benefits. So people don't end up running the type checker during development anyway. Which defeats the purpose.
There are small places where it is useful -- some developers on the team had never used a type system before and found that it helped them eliminate errors from their code before they even ran the program.
But overall... agree, Typescript/Flow -- they were great experiments and useful -- but I'd rather see ways for us to adopt better languages. Elm, Purescript, Haskell, F# -- Javascript is great for projects of a certain size... but once you get to a large team and many tens-of-thousands of lines of it... discipline will only get you so far.
Re: Static TypeScript: A Static Compiler for the TypeScript Language
#29This language is quite striking! TypeScript is a superset of JS but here we're going from the other direction. Make a language that is only the TypeScript extensions to JS, and drop all the JS parts. No Object (!!), no Date, TypedArray, RegExp, almost all the mainstays are gone. It's Java 1.0: static offsets and vtables. This feels like the beginning of TypeScript throwing its weight around. It has the momentum to su…
Re: Static TypeScript: A Static Compiler for the TypeScript Language
#30Earlier quoted context omitted.
> Make a language that is only the TypeScript extensions to JS, and drop all the JS parts. So? Is there a reason left then to use Typescript instead of C or C++? I cannot think of one. Especially for education you better use a real language that will stay for more than 10 years at least. Microsoft is doing a great job taking over the Javascript community, and now this.., would love to see their hidden agenda. IMAO Ty…
I am not sure where you are going with that. C++ is largely popular and enduring for the same reasons as Java: institutionalization (taught in school).
I'm not aware of any place where C++ is taught. (And in fact C++ programmers are very hard to find.)
C is very common and anybody with even a bit of format education has been exposed to C.
Then you get people who know a bit of C and throw in a couple 'class' and a couple 'cout', and call it 'C++' for some reason.
Which is wrong, obviously.