

Ask HN: How would you rebuild the browser today? - arxpoetica

(Using today&#x27;s technologies.)<p>(Would you rebuild the browser?)<p>Just coming off an impromptu and hotly contested ;) debate with my brother about the current state of browsers. The premise, what if browsers were reinvented from the ground up today? What would we do differently.<p>&gt; Imagine that the huge breakthrough technology that got everyone in software, business, and marketing all excited about computers and on board were Microsoft Word, and from thenceforth all software were run inside Microsoft Word&#x27;s layout system, and a programmer&#x27;s life was writing Word macros and getting them to work together and scale well, just to beat the fickle layout into shape. Then people decided they wanted dynamic content inside Microsoft Word, and to make them do all kinds of things... and we can call them &quot;apps&quot; and wow people with all the things computers can do these days (while software outside of Word has been doing these things for 15 years and in more elegantly designed and maintained ways). Good thing that never happened. Oh wait, it did, but it&#x27;s called a web browser, html and css, php, javascript...<p>I think it&#x27;s a great question. Genuinely curious about people&#x27;s opinions.
======
Someone1234
If you're rebuilding the browser from scratch but keeping everything else the
same (same market, same popular web-tech, same backwards compatibility
concerns) then my answer would be "I'd just build a WebKit wrapper and be done
with it." With all of the history, momentum, and peoples expectations there
isn't a whole lot you can do differently even if you are starting from a blank
canvas.

Honestly the only thing I'd want to change if I could re-write history is:

\- HTML is now XHTML based.

\- JavaScript would be scrapped and redesigned entirely.

\- Fix a few issues with CSS (nothing major, but maybe make the spec more
specific/less ambiguous in places).

~~~
arxpoetica
> JavaScript would be scrapped and redesigned entirely.

That's a significant change. What would you replace it with?

~~~
Someone1234
Keep in mind time travel, but maybe Dart. I realise they've discontinued it,
but if you could travel back in time and provide Dart as a JavaScript
alternative, it would no doubt win outright (since JS took so long even to get
to where it is now).

Honestly, and this is going to sound crazy, even VBScript is a better language
than JavaScript. I understand why it didn't take off, it was only supported by
one vendor, and was proprietary (as opposed to JavaScript's "free"), but in
terms of the core language it had features JavaScript won't have until
ECMAScript 6 is released.

~~~
manidoraisamy
Is Dart discontinued? Or, did you mean Dart VM?

------
bahador
a single web specification that browsers would be forced to adopt in order to
prevent fragmentation. html and javascript may be different technologies, but
as react has taught us, are of the same concern. so merging them closer
together would be good (web components is a step in the right direction).
throw in css in there too because it's currently a joke. it should have
consistent behavior across varying divs, regardless of usage.

post script: javascript should be type safe and support interfaces/abstract
classes.

------
marssaxman
I would include a Bittorrent-based CDN as a first class protocol element and I
would make a clear and unbridgeable distinction between "web apps" and
hypermedia documents. Web apps would be carefully sandboxed in order to ensure
that the user, not the developer, has control.

------
stray
I actually have a personal side project addressing precisely this.

You see, we don't use the web as a publishing environment any more. We use it
as a view layer for n-tier applications.

~~~
arxpoetica
Any details you feel comfortable sharing?

~~~
stray
Not just yet.

I think it's super obvious and would rather nobody beat me to the punch.

------
anon3_
I'd allow browsers and sites to be extended by languages that weren't JS.

\- Support sandbox'd languages in browser, perhaps python.

\- Plugin support for other languages, perhaps python.

