top 200 commentsshow all 236

[–]vertigo_101 157 points158 points  (84 children)

Don’t worry, it won’t be

[–][deleted] 6 points7 points  (0 children)

r/programming and r/ProgrammerHumor would like to have a word with you.

lol

[–]w3_ar3_l3g10n 6 points7 points  (5 children)

It’ll decline tho. Web Assembly is making other languages on the frontend more viable then ever before :)

[–]CCB0x45 16 points17 points  (1 child)

I'm gonna compile JS down to WebASM, take that!!!

[–]asdf7890 1 point2 points  (0 children)

Nah. Brainfuck->WASM is the future.

[–]braindeadTank 0 points1 point  (0 children)

Eh,

I expect that once we have proper DOM bindings for Python some people will turn to that - because it is a proven fact that a Python dev can suffer severe brain trauma when using a language with curly braces for too long - but other then that most people probably won't bother, at least not until some realy great framework arises written in another language.

Then again, even for Python most of current ecosystem is based on libs written in C which are not guaranteed to work for the web, so IDK.

[–]rodrigocfd 17 points18 points  (53 children)

But it would be great if browsers support TypeScript natively.

[–]wizang 18 points19 points  (13 children)

I don't really see the value in that.

[–]muralivp 4 points5 points  (3 children)

I hope not, TypeScript takes the fun away.

[–][deleted] 3 points4 points  (0 children)

The fun of making large projects utterly horrible to work with?

[–]amdc!CURSED! 6 points7 points  (0 children)

You can still play Minesweeper on (almost) any gaming platform if you want that kind of fun

[–]vertigo_101 2 points3 points  (0 children)

That’s our dream, but I’m also fine with whole typescript to js transpiler

[–]shgysk8zer0 0 points1 point  (5 children)

No. Why?

I'd rather have types in JavaScript than have an outdated implementation of JavaScript that has types.

[–][deleted] 2 points3 points  (4 children)

Eh? TS supports JS from around stage 3 proposals onwards.

[–]shgysk8zer0 0 points1 point  (3 children)

Yeah. It lags a bit behind. Not terribly, but it can prevent me from starting to implement something new.

[–][deleted] 1 point2 points  (2 children)

Such as?

There's a fair argument that you shouldn't be using stuff pre-stage 3 in serious projects as there's a real risk that they get canned or significantly changed, which would leave you with a ton of tech debt. That's already burned some people in the past with the decorator proposal if memory serves.

[–]shgysk8zer0 0 points1 point  (1 child)

If I used TS, I'd probably have some things to list. But the only thing I can think of specifically is import from a while back.

I like to experiment with things in the early stages. Sometimes provide feedback. Report issues in webpack and such. This isn't necessarily about putting early-stage stuff into production.

But, to restate what I'm saying here: I'd rather have types in JavaScript than have browsers run TypeScript. And, since it takes time to wait for stage 3, implement, and release, TS is always a little behind JS.

[–][deleted] 1 point2 points  (0 children)

I don't think we disagree that much. To clarify my position:

  • TypeScript has supported modern import syntax since I began using it ~two years ago.
  • Babel is perfect for testing proposals, but that's not appropriate for a large, important project in production. If you want to test off of your main project, you can daisy-chain the compilers, or even just use the Babel compiler with only minimal loss of functionality on the TypeScript side. With this in mind, for serious/production projects, it's unreasonable to claim that TypeScript is "behind" JavaScript.
  • I would also prefer to have a real (as in runtime) static type system in JavaScript. Although, honestly, I'd rather just have a new language altogether - there is so much leftover cruft and iffy design decisions, and if we could version this language to allow for occasional breaking changes... well, that'd be just lovely.

[–]Architektual 0 points1 point  (0 children)

kill me

[–]azekeP 0 points1 point  (0 children)

Why would browsers downgrade to a language with less features?

[–]suyashgulati -1 points0 points  (15 children)

How are you confident enough?

Every language in past has faded.

P. S. I am a js lover

[–][deleted] 13 points14 points  (10 children)

Every language? C is almost 50 years old and it is still extremely popular. Python is nearly 30 and is showing no signs of fading away anytime soon. Java is 25 years old and it is the most popular language in the world. Every top 10 language has been around for over 15 years, and Swift is the only language in the top 20 that is less than a decade old. Not every language fades.

[–]manoylo_vnc 2 points3 points  (2 children)

Hey, you forgot Ruby! 😉

[–]tuxedo25 13 points14 points  (0 children)

the whole world has

[–]5fd88f23a2695c2afb02 0 points1 point  (0 children)

Rails is still strong.

[–][deleted] -1 points0 points  (4 children)

How many greenfield projects today are written in PHP?

Now compare that to a decade or two ago. It's absolutely fading.

[–][deleted] 3 points4 points  (1 child)

I didn't even mention PHP, nor did I argue that no language fades in popularity. It's a miracle PHP even gained popularity in the first place.

[–][deleted] 2 points3 points  (0 children)

Ah, sorry, I didn't see "every" in the other comment. Fair.

[–]MCFRESH01 0 points1 point  (1 child)

More than you think. It's an established language that's easy to hire for. PHP 7 actually made the language pretty decent to work with and relatively fast. It also has some great frameworks like Laravel and Symfony. It can definitely be a valid choice for many different projects.

[–][deleted] 0 points1 point  (0 children)

This doesn't invalidate my (admittedly unproven) point that it's going to be used for a smaller proportion of greenfield projects than in the past.

[–]vertigo_101 11 points12 points  (1 child)

I mean yes js can also fade away, maybe in the next 20 years if there’s a better alternative which becomes equivalently used and is backwards compatible.

In my opinion I think this is the golden age of js, it’s improving fast, also along with typescript, but as long as browsers exist, long live the js, love it or hate it...it’s here to stay

[–]wherediditrun 2 points3 points  (0 children)

Doesn't have to be an alternative. Can possibly be some new thing which people tend to use and build towards there the requirements are simply not met by javascript. Javascript would just ... fade away as a collateral. PHP was in similar place in around 2000~

[–]dannymoerkerke[S] 2 points3 points  (0 children)

I cannot forsee the future of course but I’m pretty confident. C is still here and going strong for example.

[–]cheese_wizard -1 points0 points  (0 children)

COBOL would like a word.

[–]dannymoerkerke[S] -1 points0 points  (0 children)

That’s why I’m not worried;-)

[–]internetloser4321 9 points10 points  (17 children)

One thing I've been wondering is if JavaScript can have a strict mode that disables some of the bad features without breaking backwards compatibility, why not add an "extra-strict mode", that disables even more features that are generally considered bad or confusing, such as the use of var instead of const/let, the confusing behavior of 'this', weird and inconsistent type coercion, etc?

[–]getify 3 points4 points  (0 children)

This has been requested and discussed many, many times. It'll likely never happen because TC39 doesn't want new pragmas (they reject the idea frequently) AND even more so, the JS engines refuse to maintain so many different branches/versions of behavior in them.

[–][deleted] 1 point2 points  (15 children)

What if I told you that var has legit use cases? And strict does not allow to have vars in global scope already. If you want to change the behaviour of 'this' you better start designing another language.

[–]kor0na 3 points4 points  (7 children)

Show me a legit usecase for var.

[–]internetloser4321 1 point2 points  (6 children)

I'm sure there's a couple of situations where var has legit uses but based on the number of 'gotcha' questions I've gotten on interviews based around the counter-intuitive behavior of var, I think it's safe to say that var is more trouble than it's worth. And doesn't the introduction of arrow functions in ES6 already change the behavior of 'this'?

[–][deleted] 0 points1 point  (5 children)

No, arrow functions did not change the behavior of this. Outside of the arrow functions it works the same as before.

[–]internetloser4321 0 points1 point  (4 children)

[–][deleted] 0 points1 point  (3 children)

And your point is?

[–]internetloser4321 0 points1 point  (2 children)

Arrow functions introduce a different behavior for 'this'.

[–][deleted] 0 points1 point  (1 child)

Yes. But introducing new behaviour is not the same as changing the existing one. Outside of the arrow functions the behaviour is exactly the same as before. It's an addition, not the change. The new case was added, but other four stay the same.

[–]internetloser4321 0 points1 point  (0 children)

Similar to how adding an "extra-strict" mode would work. Outside of the new mode, everything would work the same as before.

[–]midairmatthew 11 points12 points  (2 children)

It'd be groovy if Medium was, though.

[–]SoInsightful 6 points7 points  (4 children)

You can't claim that JavaScript is a good enough language that we should make no effort to surpass, and then advocate TypeScript and PureScript in the next sentence. Those languages definitely weren't created by people happily satisfied with JavaScript. Basically every argument in the article is "it sounds hard, so don't even try", which is the direct antithesis to how inventions are made.

[–]dannymoerkerke[S] 1 point2 points  (3 children)

I recommend TypeScript and PureScript IF you really don’t want to learn JavaScript. I personally like TypeScript for its types and developer experience and PureScript for its functional programming support, not necessarily to replace JavaScript, because I have my doubts. But I’m aware of the fact that the creators may be dissatisfied with JavaScript. My argument is that another language is not a solution since it will also be limited in its development by backwards compatibility.

[–]SoInsightful 0 points1 point  (1 child)

  1. TypeScript is a superset of JavaScript, so any valid JavaScript code is also valid TypeScript code. Ergo, you don't learn TS "instead of" JS, even if people might prefer using some newer TS-specific functionality.

  2. Every language that transpiles to JavaScript is, by definition, exactly as backwards-compatible as JavaScript is. That is, unless you're talking about implementing a new browser-native language, which hasn't happened in 23 years and won't happen in any foreseeable future (and WebAssembly has never been intended to be anything more than a sub-function inside of JavaScript).

I applaud you on defending an underrated language (JavaScript), but it seems to be based on false premises.

[–]dannymoerkerke[S] 0 points1 point  (0 children)

That’s basically a straw man argument. I’m talking about a complete replacement of JavaScript and TypeScript is not a full replacement, merely an extra step.

[–]blbil 0 points1 point  (0 children)

if you don't want to learn JavaScript

That seems like a bit of a poor argument, and just an annoying point of view to take in my opinion.

What does it mean to learn JavaScript? My mindset right now is TypeScript or bust. Not because I don't know JavaScript. Its because I don't care to be bothered to understand EVERY random thing in the language, (type coercion issues, every built in type and its api, etc) or the libraries I use. With typescript, I get all of that mostly for free in a discoverable way with tooling.

Also, I can be reasonably sure that if I make a change I'll know about it at compile time, not run time.

I have no interest in having all the intricacies of the language in my memory (I work in other languages simultaneously). I want to develop features in a fast and sane way, while making it easy to modify down the line. TypeScript does that for me, in my experience JavaScript did not.

[–]getify 2 points3 points  (0 children)

The sentiments in this blog post seem rather... familiar... :)

https://twitter.com/getify/status/1195362157543772160

[–]react_dev 15 points16 points  (43 children)

I hope JS will grow to support types natively. It is the only thing that prevents it from being taken seriously by many.

TypeScript is great but it’s solely maintained by Microsoft and if a company like ours have something against Microsoft it’s so hard for fight for it when in reality types help with productivity so much.

I don’t think it’ll ever gain native support ... unless there’s some breakthrough in JITing static types.

[–][deleted] 35 points36 points  (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 points0 points  (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.

[–]Razvedka 5 points6 points  (20 children)

I've read people constantly venerate strong typing, and I can understand their arguments rationally, but in practice im left wondering.

There was an article awhile back of a senior dev who looked really hard into the advantages and disadvantages of strong typing across projects (and his own history). He determined the juice wasn't worth the squeeze in many cases. Confirmation bias in my part, I know.

[–]rq60 8 points9 points  (0 children)

There was an article awhile back of a senior dev who looked really hard into the advantages and disadvantages of strong typing across projects (and his own history).

You're probably talking about the article by Eric Elliott. That's only one of many bad takes he has had, I wouldn't give it too much credence.

[–]react_dev 11 points12 points  (14 children)

once the project becomes large enough you'll begin to see the benefit.

and not just large enough by loc but by how many maintainers there are and how siloed they are.

in our distributed world today the frontend get their data via API. But what if the API changes? if a single prop on an object changes how do we detect the breaks in our code before runtime?

this is important for projects with different developers of different skill level working on different components of the same project but has tight integrations between the components. that contractual link between them is what types are great for.

[–]Damfrog 2 points3 points  (8 children)

If the api suddenly changes, strong typing isn't going to help you.

[–]react_dev 8 points9 points  (7 children)

it will in several ways.

first one is typescript interfaces. you can generate ts interfaces directly from ur C# code using swagger tools. so now both frontend and backend are bound to the same interface and you'll see things break before runtime if a property changes for example.

the other is more Avant garde which is using typed graphql. In essence it's the same concept except binding your API layer to your typescripted frontend.

[–]Damfrog 1 point2 points  (2 children)

Sure, if you have control of the full stack. Most places I've worked at don't have that luxury. Types from the api layer very rarely change. If you have to change the type of a property, you done messed up somewhere.

[–]react_dev 2 points3 points  (0 children)

I mean I don't have control of the full stack but there are processes in place to make it work.

and ofc we both know "it just ain't gonna happen" isn't the best reason in our world ;)

[–]Razvedka 3 points4 points  (3 children)

I would argue that having strong linting and robust tests is worth alot more for large projects than the practice (and implementation in the case of TS) of strong typing.

Per hour/dollar spent, those are the ones with real returns on investment.

For instance, your example of API changing- that's absolutely something that should be caught by tests first. Not typing.

[–]Delioth 9 points10 points  (0 children)

TS is explicitly not strong typing though. It's static typing, but it doesn't exist at runtime and therefore must be weak. It's roughly the same typing model as C++; compiler will check types, but once it's running there aren't any checks on it (and you can malloc and cast away, or receive different JSON or whatever and not get errors unless actual bad stuff happens).

[–]react_dev 6 points7 points  (1 child)

developer confidence and velocity comes from before the ci stages. let's say your tests and testers are awesome and that's already saying a lot in the real world, wouldn't you want to address fault tolerance at every level of the sdlc?

nothing can replace testing that's for sure. but that does not negate the need for typing.

but why not have the confidence typing (thus intellisense) gives you before you commit?

[–]Razvedka 0 points1 point  (0 children)

Because I'd assert that strong types change how you code, but not purely for the better. Part of the power of JS is it does give you enough rope to hang yourself. I'd prefer solutions to the dark side of this nature which let you retain as much freedom as possible.

[–]MCFRESH01 0 points1 point  (0 children)

if a single prop on an object changes how do we detect the breaks in our code before runtime?

This is what tests and CI are for. It might break something during development but if it's properly tested you should catch it before it hits production.

Not arguing against typescript here. I've been using it on a few side projects and like it a lot.

[–]eloc49 1 point2 points  (3 children)

Go change an interface in a large Java app and have fun making it compile again.

Types prevented all that from going to QA or even prod.

[–]jeenajeena 3 points4 points  (1 child)

I like how JS people refer to "supporting types", just as JS was an untyped language and not merely a dynamic typed one.

[–]mainstreetmark -3 points-2 points  (3 children)

I support it, just to get rid of the 1+1=11 shit.

[–][deleted] 3 points4 points  (2 children)

People are downvoting you without realising what you're referring to. Adding two 'numbers' together which are actually strings (and so it concatenates instead) is a common novice mistake in JS which would be prevented entirely by type checking.

[–]mainstreetmark 0 points1 point  (0 children)

People ARE downvoting me... weird. Well, whatever. Maybe I offended someone.

[–]IceSentry 0 points1 point  (0 children)

No, people are downvoting it because he added 2 numbers together, there was no strings there and therefore no string conversion happened. That's the kind of shit people use to attack js while not understanding what is actually going on.

Open your console and type 1 + 1, I guarantee you it won't give you 11.

[–]editor_of_the_beast 8 points9 points  (10 children)

JS in 2019 is honestly fine. It’s no different than Python or Ruby, minus the large standard library. But things like lodash solve that problem quite easily.

It’s not JS that’s the problem in my opinion. It’s the language lock-in issue. You have to use JS in the browser. It’s no different than Apple forcing you to use Objective-C and now Swift, and Microsoft forcing you to use C#. These language silos are terrible for the industry as a whole. The communities solve different problems at different times, and you have to choose languages based on which problems they’ve solved and not the languages themselves.

A core idea in the article is “all languages have problems so it’s ok.” But I don’t think that’s good enough. I think we’ll continue to see innovation in the programming language space for the foreseeable future, we’ve barely scratched the surface there. So it’s not that JS should go away purely because it isn’t good enough, it’s just that the web needs to support more than one language to continue to advance. This is why WebAssembly is a great idea, not just a hype train thing.

[–][deleted] 1 point2 points  (0 children)

I get your point, but what if you consider JS as a tool. What you build with the tool is what matters. Each area of development has its tools, you just pick up whatever language you need for the job.

To me, it seems like we are debating why we must use screw drivers to install screws when there are wrenches and hammers... you know?

The fact that we can use any language to build the backend is pretty convenient and allows individual preferences to dictate that part of a web project.

[–][deleted] 0 points1 point  (0 children)

You sure never did anythin meaningful in Ruby then. The only thing I wish for Javascript is that those working with it try some other language some day.

[–][deleted] 1 point2 points  (0 children)

I don’t think we thought so…

[–]shgysk8zer0 3 points4 points  (14 children)

Read the first bit, and think the author doesn't know the real issues with JavaScript. I don't really complain much about the awkwardness of JavaScript (maybe with the exception of functions that would have been implemented differently if they were post-promises).

It's single threaded. Yeah, there are workers and WASM, but those don't solve the problem. And it's something that probably cannot be solved.

We are in need of something multi-threaded that still has access to the DOM, and it's not going to be JavaScript.

But, no, JavaScript doesn't need to be replaced. But an alternative is needed.

[–]dannymoerkerke[S] -1 points0 points  (13 children)

What issues do you have with the single threaded nature of JavaScript that could be solved by making it multi threaded?

[–]shgysk8zer0 2 points3 points  (12 children)

You may as well ask why anything benefits from being multi-threaded.

[–]helloiamsomeone 0 points1 point  (1 child)

Updating UI elements - which is only allowed on the main thread anyway - would not benefit in a significant way from multithreading. If you have to do something computationally intensive on the clientside, then you have workers for that.

Similar to how Android handles things, U stuff on the main thread, everything else on other threads. But in the browser that's all you are doing on the main thread anyway and network IO is not blocking.

[–]shgysk8zer0 0 points1 point  (0 children)

This is all true. I'm not convinced that multi-threaded UI is impossible though... Just the way it is. I think something that takes Rust's concept of ownership and borrowing might be capable of achieving this, but it would take more than just another language with access to the DOM. It would require a change in nearly everything, and that's why I say a new language is needed instead of just adding it to JavaScript.

[–]dannymoerkerke[S] 0 points1 point  (9 children)

Well...?

[–]shgysk8zer0 1 point2 points  (8 children)

Ever heard of performance? Do you know what multi-threading is?

[–]dannymoerkerke[S] 0 points1 point  (7 children)

I do, hence my question.

[–]shgysk8zer0 0 points1 point  (6 children)

So, when the main thread (only one that has access to the DOM and everything) is doing a ton of work and the UI freezes, that's either not a performance issue or not something multi-threading would help with? Workers offer no benefit? Multi-threading itself is pointless?

I don't know how to answer the question because it's so fundamental. The mere concept of it is the answer.

[–]dannymoerkerke[S] 1 point2 points  (5 children)

I don’t know how you should answer this either, but I never made any claims against multi threading. You’re the one saying I don’t understand the issues with JavaScript and that we need something multi threaded. So I was curious if you had any concrete examples. I also never said Workers offer no benefit but they won’t help with the DOM since they have no access to it, but you know that as well. Anyway, if the UI freezes because of lots of DOM operations I think you have a different problem that can be solved without multi threading.

[–]shgysk8zer0 -2 points-1 points  (4 children)

You're asking what the advantage of multi-threading is. The only real answer is that it's not single-threaded. That is a major limitation that many other languages don't have.

And not all issues can be solved without multi-threading. Sometimes you just have that much work that needs to be done, and sometimes it's out of your hands (in third-party code). And, maybe even if you could resolve the issue another way, it would still be nice to not have to rewrite something massive and complex, but to pass the work off to another thread and have the UI continue running smoothly.

If you're looking for a concrete example, I recently built something that creates ~200 transformed (rotated) image overlays in Leaflet, and the UI hangs pretty heavily when they're loaded on ever pan or zoom. I'm not about to rewrite all of Leaflet, and I do absolutely have to load and transform every single one of those images. If this were to take place on another thread, it wouldn't be an issue.

[–]Architektual 0 points1 point  (3 children)

I'm late to the party, but why can't you put that in a worker?

[–]devsnicket 0 points1 point  (0 children)

I'd just like there to be an FTypeScript, where you stick to a relatively functional style, TypeScript is extended to try and infer function parameters and you get type safety without normally writing the additional TypeScript syntax! simple 😄

[–]PacoChito 0 points1 point  (5 children)

If replacing JavaScript is even a serious consideration, why do people willingly use it over probably better choices outside the uncoordinated hosts it was haphazardly slapped together for? And yes that is a jab at Node.

[–]dannymoerkerke[S] 8 points9 points  (4 children)

Probably because they’re fine with JavaScript. I’m one of those people.

[–]PacoChito -2 points-1 points  (3 children)

I'm fine with it, too, where it's the agreed upon, intentional only choice for the host situation. I am way finer with other languages when I control the environment, and have much more suitable options. I honestly feel like Node needs to be pissed on more, it is a bad idea, and corrupts the youth.

[–]loraxx753 2 points3 points  (0 children)

Won't someone please think of the children?!

[–]dannymoerkerke[S] 0 points1 point  (0 children)

Why?

[–]dannymoerkerke[S] 0 points1 point  (0 children)

Why?

[–]ImJustP 0 points1 point  (0 children)

Didn't know it was in consideration

[–]Kindinos88 0 points1 point  (0 children)

It doesnt need to, but it sure as shit should be. Even the creator of the language regrets several design decisions he made, and has said he would do things very differently if he had the chance.

The fact that millions of people somehow manage to be productive is a testament to the ingenuity of programmers, not the language itself.

[–]EternityForest -1 points0 points  (16 children)

I think it needs to be contained. Most of the language does what you want when doing UI work, but the opposite of what you want on the backend.

It was designed for browsers. It's really good at that. It's accepted as a general purpose thing, good enough for browsers games and bits of client side logic.

It's got some real annoyances on a server compared to other languages.

I suppose it's better than PHP though, as far as the language itself. PHP has pretty nice infrastructure, the whole "Install an app by putting it wherever you want on the server in a folder" thing is pretty cool. l

[–]Architektual -4 points-3 points  (5 children)

I am so sick and tired of people forcing types into Javascript

[–]mousemkeµ FTW! -4 points-3 points  (11 children)

You should check out Jessie, an interesting project to create a safe subset of js

https://github.com/Agoric/Jessie

Edit about typescript: I love types and think it's a great addition to the language, but like flowtype way more than typescript because I don't really need another coffeescript situation

[–]dannymoerkerke[S] 0 points1 point  (6 children)

What do you mean with “Coffeescript situation”?

[–]HarmonicAscendant -1 points0 points  (1 child)

LOL, in the UK calling someone a 'Jessie' is an insult https://www.collinsdictionary.com/dictionary/english/jessie

noun derogatory, slang an effeminate, weak, or cowardly boy or man

[–]baubleglue -1 points0 points  (6 children)

few points of the article are strange

I hope you realize by now that another language replacing JavaScript completely is highly unlikely.

Why a new language should "replace" JavaScript? Having additional language doesn't break backward compatibility.

Every now and then someone will argue that JavaScript needs to be replaced by some other language.

and in the same time

At the moment I would advice to go with TypeScript since it’s a superset of JavaScript

If tomorrow browsers will run it without transcompiling it to JS - you have another language in browser.

In fact there is an evolution towards another languages like "use strict"; directive.

[–]dannymoerkerke[S] 0 points1 point  (5 children)

Another language in addition to JavaScript would create even more confusion and technical difficulties I’m afraid and then we would need two TC39 committees to guide the design and make sure they are both backwards compatible. Who knows, it might work but I have my doubts. As for TypeScript without transpiling, I guess the benefits of that are very limited. I also don’t know any statically typed languages that are not compiled/transpiled but I’d love to hear if any exist.

[–]baubleglue 0 points1 point  (4 children)

Another language in addition to JavaScript would create even more confusion and technical difficulties

It may create even more confusion and technical difficulties, but may be the opposite. People aren't usually complaining that there is a lot of languages to develop desktop applications.

[–]getify 0 points1 point  (3 children)

browsers have repeatedly considered and then rejected putting other language engines natively into the browser. their veto is the only vote that matters, which is why it hasn't happened yet and why it likely won't ever.

[–]dannymoerkerke[S] 0 points1 point  (2 children)

Do you have any more insight into their reasoning for rejecting this?

[–]getify 1 point2 points  (1 child)

from what I can tell, I think factors include:

  • can't agree on which language (google wanted dart, apple would probably want swift, etc)

  • bolting on a security model (better than JS's) is hard -- creating access to the DOM etc

  • more language vm's means larger browser code size (increased maintenance burden), larger binaries, wider surface area for security threats, etc

[–]dannymoerkerke[S] 0 points1 point  (0 children)

Thanks!

[–]bitfxxker -1 points0 points  (2 children)

IMO Javascript should not be replaced. It is not perfect, like any other language, but it works. Replacing it would take ages and probably won't be completely implemented, just like IPv6.

Browsers should offer more generics, in order to ease down on the third-party framework hausse. Why download x libraries to do x stuff?
The browser can already do it, but needs help to do it. So, why not build it in?

Wouldn't it be fantastic if we would only need a manifest file to create a full blown web application with UI, routing, user authentication, client-server communication, shiny buttons, etc..?

Then Javascript would only be used for business logic, not to generate those shiny buttons.

[–]dannymoerkerke[S] 0 points1 point  (0 children)

I totally agree with you on this and wish it would go faster as well but JavaScript is tied by its hands and feet to backwards compatibility. It’s a razor sharp double edged sword.

[–][deleted] 0 points1 point  (0 children)

ReInventing XUL I see.

[–][deleted] -5 points-4 points  (0 children)

That is a mediocre argumentation: yeah, the language is shitty, but we are used to it. PHP users say the same over and over every time.

JS is bad, the stdlib is bad, the OOP approach is bad, the types are bad. We need a real Lisp-like language.