Hacker News new | ask | show | jobs
by netdur 2029 days ago
For what? Imagine a world without Javascript? You have mini extension in browser to just auto refresh gmail
10 comments

Imagine a world without Javascript?

What a dream.

Be the change you want to see. Your personal website linked to from your HN profile consists solely of a Javascript game ... :)
If we had a world without Javascript it would probably be some nightmare with SaaS companies building their apps in Flash or something.
This notion always makes me laugh. Which is better, Google Maps or the old MapQuest pages that had arrows and reloaded the entire page when you wanted to move the map? I know which one I prefer.
I'd be afraid flash would come back. Ah, those flashbacks...
Flash is better than JS to be honest. JS still hasn't caught up with ActionScript. The only bad part about Flash is that it's proprietary.
When flash was focused, my keyboard shortcuts didn't work. I hated it just for that.
Hm. I think it was a bug in some browsers but not others? I remember encountering it but I don't remember it as something persistent.
I've used lots of different browsers. I never found a single environment where it ever worked right.
I would agree that Actionscript 3 as an implementation of ECMAscript is more of a delight than JavaScript as a language which conforms to whatever version of ECMAscript. But compiling to VMs in the browser? Never again.
Out of curiosity, what language would have replaced Javascript in you dream?
> You have mini extension in browser to just auto refresh gmail

That existed without JavaScript (and IIRC it was somewhat common back when JavaScript was a novelty): <meta http-equiv="Refresh: 60">

Periodically tearing down the entire UI while the user is in the middle of using it is a terrible user experience.
That’s not how it was usually implemented though, you’d have frameless iframes that refreshed - eg for chat rooms etc
Did it preserve the scroll position when refreshing? If so, that might be OK for a chat room. But an email inbox is more interactive, so I think it would be jarring to have that refresh as you're poking at it.
That was called an IMAP client. It was fine.
It's still fine.
I'm pretty sure the GP was joking.
Development would be so much faster without JS. It could be done in a Flash.
It was supposed to be Scheme in the browser, not an inconsistent typeless error-prone mess.
>For what? Imagine a world without Javascript?

What a pleasant way to begin my day. Thank you for this moment of bliss.

> You have mini extension in browser to just auto refresh gmail

Why would I ever want to touch a webmail interface with a 3 m pole?

> Imagine a world without Javascript?

That would've been a better world. Imagine the web that isn't an application platform. (it still isn't, but it's being actively shoehorned into becoming one)

Web browsers were not invented to be application platforms. They were intended to view documents and click through them.

Server-side applications (CGI) started the trend of the web browser becoming an application interface. Javascript made the web browser the application platform. But of course it was not designed for this, so a million hacks have been added to shore it up. To the point of literally including a standard to ship arbitrary binary executable programs into it. There used to be another tool and language which allowed you to ship arbitrary binary executable programs to remote systems... it was called Java.

The Web is the best example in history of how successful turd polishing can be. The global economy now rests on it.

> ...not invented to be application platforms.

Phones were invented to only make phone calls.

Coca-Cola was originally created as a way to counter morphine addiction.

Listerine was originally a floor cleaner.

None of those were turds and neither is the web as an application platform. Quite the opposite- Native apps suck compared to web apps. The only native apps I personally use besides the browser on my phone are Maps, Messages, Slack, Camera/Photos and those are only because there's no other choice. Imagine having to use an app instead of popping open the web browser to order from Amazon? Yeesh

Right. Because Slack is such a joy to use in browsers that there is no native app needed.

Oh wait. Yes there is. It's the web app as a native app, because the browser experience literally wasn't good enough.

Saying web apps are superior to native apps is like saying a bicycle with a 2-stroke is superior to a motorcycle. Maybe for your use case it's better, but objectively it is literally a crappy imitation of the real thing that can't even do things the real thing can. A web app is the Visual Basic of applications (but not really since VB is so much more useful!)

> Saying web apps are superior to native apps is like saying a bicycle with a 2-stroke is superior to a motorcycle.

Nope, it's not like saying that at all.

Your entire argument rests on denying that Electron is a browser too. That's incorrect. Electron is just another browser, one that the web app developer happens to have more control over than they do Chrome. Every Electron app is a web app. Browsers have always handled the native bits for the web app and that's exactly what Electron does. (On the mobile side of things, React Native via something like Expo would be the equivalent of Electron on the desktop.)

Together, the browser and the web app form a native app because a browser is basically a scriptable native app. So, your argument is that "native apps > scriptable native apps" which makes no sense.

> Maybe for your use case it's better...

Web tech is absolutely better for every user-facing (GUI) use case. Even with 3D games which are streaming via browsers right now - performance might not be the greatest right away but since browsers have all the capabilities that any other native apps has (because they're native apps themselves) - it wouldn't be inconceivable that 3D web games could perform on par with native 3D games.

Personally, I develop all of my CLI/server apps with web tech as well (that'd be JavaScript running under Node.js). There's really nothing better - and that's why JavaScript is the most popular programming language in the world by far.

> A web app is the Visual Basic of applications (but not really since VB is so much more useful!)

Having started my career with VBA I couldn't disagree more. But even so, is VB (VB5/6/VBA/VB.NET?) your go-to native development environment? Any of those choices are laughable IMO, but okay - I guess enjoy developing all of your apps in VB then :)