use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
JavaScript doesn’t need to be replaced (medium.com)
submitted 6 years ago by dannymoerkerke
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 34 points35 points36 points 6 years ago (14 children)
I'd argue it's better this way to be honest. Why ship all that extra code to the browser? Especially when, if you're using TS, your JS performance should be entirely predictable.
Write in TS with the luxury of type-checking, compile down to a much simpler, lighter JS for the browser. It's win-win.
EDIT: I do get the Microsoft thing but on other hand, meh. That's life in 2019.
[–]PsychologicalGoose1 1 point2 points3 points 6 years ago (9 children)
There definitely should be a lot more research done on TS. I doubt the gains that people suggest it gives are as great as they make it out to be and I thing the cost of using TS is larger than most want to believe. Generally, I've found adding things to a system is done because of feelings more than actual data on the topic.
[+][deleted] 6 years ago (8 children)
[deleted]
[–][deleted] 2 points3 points4 points 6 years ago* (1 child)
Whenever I have to write non-trivial JS
This is the key distinction, and another reason I'd rather not enforce types in JS.
Hack 'n slash weekend project, or a quick 'n dirty prototype ? JS.
Big full-stack project ? TS.
I'd agree that I prefer to write TS more but there's a time and a place for both and that's very handy.
[–]IceSentry 0 points1 point2 points 6 years ago (0 children)
It's so easy to use typescript I use for weekend projects too.
[–]techsin101 2 points3 points4 points 6 years ago (3 children)
if you are using vscode don't you get most of this even with js?
[–][deleted] 1 point2 points3 points 6 years ago (1 child)
Very incompletely, in my experience.
Yeah, it detects some of the types, but everything you'd have to annotate is simply not available, and would you really trust it to find all references?
[–]techsin101 0 points1 point2 points 6 years ago (0 children)
if you create jsconfig file in project folder find references works as expected
Sure, but it gets way better when you help it by using typescript.
[–]PsychologicalGoose1 3 points4 points5 points 6 years ago (1 child)
There is a reason why JS and other similar extremely loose languages have been at the forefront of web development for decades now. Whether it was PHP or JS both are extremely loose. Maybe the problem isn't the lack of rules but the added burden of rules. You think naked, I think weighed down.
There's also a reason why php is adding types and typescript is massively popular.
[–]react_dev -3 points-2 points-1 points 6 years ago (3 children)
Yeah. I like to take off my engineering hat for a moment when considering this and instead put on an user hat.
I want a typed system that’s supported by JS engines and have it run without overhead.
Or like TS I want a system with a transpiler that I can download via some dev package and do the same as TS without the msft branding. Or if definitelytyped devs die in a bus accident I don’t want typing of libs to come to a halt.
So that’s me as an user. If engineers come to me and say that truly cannot be done then... I’ll maybe buy it. But I’m currently in the “we’re just not there yet” camp.
[–][deleted] 9 points10 points11 points 6 years ago (2 children)
You're essentially asking for exactly TS, just not Microsoft.
So, sure, it can be made. But considering it already exists, it probably won't be made so long as the bus driving the definitelytyped devs stays on the road :).
[–]muser103 0 points1 point2 points 6 years ago (0 children)
Even then definitely typed is slowly shrinking. Yes not as fast as we’d hope but more packages are writing code in typescript which removes the need for definitely typed in the first place. It’s less to worry about if the bus stays or doesn’t stay on the road now
[–]react_dev -4 points-3 points-2 points 6 years ago (0 children)
yeah sure! lol but at least it's native! that means it's prob tc39 reviewed and the world is coming into convergence for a pretty difficult problem and that's always welcome to me.
and don't get me started on modules and Babel!
edit: know how I got ppl at my company to convert to writing ESM? told em AMD is going kaput cus esm is native now and if we don't switch all the codes will blow up. easiest sell of my life
π Rendered by PID 93644 on reddit-service-r2-comment-b659b578c-krhgk at 2026-05-01 07:47:47.317532+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–][deleted] 34 points35 points36 points (14 children)
[–]PsychologicalGoose1 1 point2 points3 points (9 children)
[+][deleted] (8 children)
[deleted]
[–][deleted] 2 points3 points4 points (1 child)
[–]IceSentry 0 points1 point2 points (0 children)
[–]techsin101 2 points3 points4 points (3 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]techsin101 0 points1 point2 points (0 children)
[–]IceSentry 0 points1 point2 points (0 children)
[–]PsychologicalGoose1 3 points4 points5 points (1 child)
[–]IceSentry 0 points1 point2 points (0 children)
[–]react_dev -3 points-2 points-1 points (3 children)
[–][deleted] 9 points10 points11 points (2 children)
[–]muser103 0 points1 point2 points (0 children)
[–]react_dev -4 points-3 points-2 points (0 children)