View Single Post
Old 12-03-2017, 10:35 PM   #31400
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
And if this wasn't enough (with regard to TypeScript):

A browser obviously cannot execute it, because it's not Javascript. Therefore Microsoft supplies a compiler, to translate typescript into Javascript. However... that compiler is written in TypeScript.

As there's no way to execute that compiler, you're stuck with a chicken and egg situation. So what do you do? Write a Node.JS package (thus, in Javascript) that can run the compiler.

Are you still with me?

So you've got TypeScript, which is basically Javascript with Types.
No browser can execute it, so you need a compiler to make Javascript out of it.
To FRACK THE WORLD, you write that compiler in TypeScript itself, so you can't run it.
To FIX THIS, you write a Node.JS module that can run the compiler...
And Node.JS modules are written in.... right. Javascript.

Summarized: Microsoft designed a Javascript derivate, TypeScript, which has a compiler written in TypeScript itself, which therefore needs an interpreter that can run it, written in Javascript, which runs on top of Node.JS, and that compiler translates TypeScript into Javascript.

Eh. I don't know, but maybe people are making software engineering WAY HARDER than it has to be. Everybody seems to think this stuff is cool, but I think its completely crazy and a roundabout way of getting stuff done.

(Yes, I know, Nicklaus Wirth wrote his Pascal compiler in Pascal, and therefore a compiler had to be created in a different language to compile the Pascal compiler... after which it could, obviously, compile itself. It's called bootstrapping a programming language, but in the case of interpreted languages, it's completely crazy, as you're running one interpreter/compiler on top of the other, which makes slow things slower.)

As Gordon Ramsay would say: ****** me.
Katsunami is offline   Reply With Quote