marius98 Posted October 18, 2018 Share Posted October 18, 2018 Hi! I have a question, Is a good practice using Typescript in 2018 or is better to use pure js? I don't know Typescript but if is better than pure js i can learn. I will use java as backend language. Quote Link to comment Share on other sites More sharing options...
rich Posted October 18, 2018 Share Posted October 18, 2018 There's no right and wrong answer for this. Try them both, use the one you prefer. There are benefits to both approaches. marius98 1 Quote Link to comment Share on other sites More sharing options...
LTNGames Posted November 18, 2018 Share Posted November 18, 2018 As rich said, no right or wrong answer. I generally recommend pure vanilla JS for coding newbies, mainly for a couple reasons. The main reason being tutorials are abundant and second TypeScript is compiled to JavaScript. To me learning why Typescript was made, by using the language it was conjured for, is generally a good idea. Nonetheless I believe the tutorials alone are the main reason, if you need answers you'll find them quicker for vanilla JS than you will with Typescript. If you are already a knowledgeable programmer then really it's just a choice between having types or not. Happy coding! Quote Link to comment Share on other sites More sharing options...
Nodragem Posted November 18, 2018 Share Posted November 18, 2018 Typescript is more than just having access to types I would say. Typescript was created because web apps became very complex and there was a need to make JS more scalable for big projects, using the oriented object programming (OOP) paradigm. Used with something like Webpack to manage the import, Typescript feels like a very robust OOP solution. I very enjoy it; and I enjoy even more the fact that you can still have some of JS freedom. Hence, I would say that for someone who don't know what is OOP, and who is beginning their journey in programming video games, Javascript is a good choice to start with small games. When that someone feels more at ease with programming, they would learn about OOP and have a look at Typescript. If you are familiar with Java, I would recommend checking Typescript. Quote Link to comment Share on other sites More sharing options...
mattstyles Posted November 25, 2018 Share Posted November 25, 2018 To put a counter argument, you can ignore OOP, its a huge red herring. Don't believe me, just do some research! He he, let the flame war begin! Only joking, lets not do that, I'm just offering an alternative. For me the premise of TS is flawed. A solid type system is something that would be beneficial in JS, but it doesn't require it, and trying to shoe-horn it on to a language that doesn't really work with it is a flaw. Languages like Dart or Elm produce a JS output, but they're totally separate languages, they don't bolt a type system on to an existing language, they bake it right in to its own language. I also totally agree with Rich though, try both, go with whichever one feels better right now for you. You can always change your mind later if you want. Quote Link to comment Share on other sites More sharing options...
jest Posted November 26, 2018 Share Posted November 26, 2018 There are some that say Haxe is what javascript should have been, a swiftly typed speedy scripting language. Typescript for me has been a life saver as javascript has too many surprises that even if I try to study them and understand them all, I'm still prone to human errors of forgetfulness and clumsiness. Overtly it's honestly just JSLint++ since all javascript code is valid typescript code and the super-set is non-intrusive. The creator of node, vuejs, vscode, google, etc, advocate it's one of the best ways to manage large scaling javascript projects. If you're on vscode, you can add //@ts-check , and typescript will check your javascript and bug you about potential errors. If you find it saves you from lots of headaches, make the jump to typescript. Quote Link to comment Share on other sites More sharing options...
8Observer8 Posted November 30, 2018 Share Posted November 30, 2018 You can show your TS-questions on Playground with mutifiles supporting. I think Plunker is one of the best: https://plnkr.co/edit/ You can use my example for understanding how to use require.js library: Drawing a few color rectangles with: WebGL 1.0, TypeScript I think it is good and interesting to learn TS with some simple graphics. And I think it is good to learn GLSL for writing shaders and knowing how shaders works. I suggest this very good book: WebGL Programming Guide: Interactive 3D Graphics Programming with WebGL (OpenGL) And this one: Build your own 2D Game Engine and Create Great Web Games Using HTML5, JavaScript, and WebGL You can rewrite examples from these books in TS. I do it now. P.S. I want to find friends for learning TS and WebGL together. I need some practice in spoken English in Skype. Please, write me a private message. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.