JavaScript. By far one of the most famous programming languages for its applications in scripting, gamedev and most notably web apps 🌐. Then its br...
For further actions, you may consider blocking this person and/or reporting abuse
Currently at stage-3: MDN: Private class fields
@babel/plugin-proposal-private-met...
Other JavaScript practices: Managing the private data of ES6 classes
TypeScript adoption: ECMAScript Private Fields
Regarding new proposal: why to use
#
instead ofprivate
keyword for the private members? Or am I missing something here?FAQ:
Ok...
:slight_smile:
I think you mean 😊
Typescript is used in Unity, Phaser, Excalibur. I'm sure there are more, but the listing of Typescript not having Game Engine Support is inaccurate.
Ok but I thought Unity removed UnityScript?
forum.unity.com/threads/does-unity...
It appears it is deprecated but not removed yet, but that does not mean we should use UnityScript until it's gone, so it's a fair point. Aside from Unity, most JS game engines come with either their own typings or have 3rd party typings available. Assuming you have a decent IDE and a project setup, you should be able to use Typescript with any JS game engine (Though without the support, like you mentioned).
I like Typescript a lot.
As do I. I like the static typing.
and intelliscense, typescript provide in vscode
It does. 😅
From TypeScript is not JavaScript:
TypeScript is essentially a JavaScript superlinter that requires more information than ESLint.
One has to become competent in JavaScript one way or another - TypeScript or not. The official TypeScript documentation doesn't cover the JavaScript foundation that TypeScript is based on.
Some projects are using TypeScript to develop "typed JavaScript":
This is true but they are different enough that people can have a preference. Hence this article 😃.
There are a few mistakes. With Babel, you can import TypeScript directly from within JavaScript, though it needs a bit of setup. In JavaScript, all parameters are optional by default, because their types are obviously not enforced. JavaScript is only JiT-compiled, otherwise an interpreted language.
With Deno coming along, there will be a time when typescript gets executed the same way javascript does, as Deno has first-class support for typescript, which would at some point eliminate the Transpiled negative depending on the use case.
I will remove it when the time comes then!
Short & sweet article.
My only comment is while JS doesn't have optional parameters "natively", it can still be treated that way. It won't complain that you didn't provide a value for a parameter, and you can structure you code to see if a parameter is given or undefined.
Does that sway your opinion of it being better than TS? - probably not. Just sayin 😏
Well, technically JS is both compiled and interpreted. Read this answer for more details.
But isn't JS more compiled than interpreted (sorry if I'm wrong, I'm not the most experienced JS dev)