Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, but he also designed JavaScript, so...


Considering he designed it in about 10 days, it could have been much worse… and now it’s one of the most popular and important programming languages in the world; go figure: https://spectrum.ieee.org/computing/software/the-top-program...

In 2001, Apple could have picked Gecko but forked KHTML instead to create WebKit/Safari because it was smaller and seemed easier to work with.

It doesn’t change the fact that back in the day, high profile companies picked WebKit—Google, Blackberry, Nokia—for their browsers.

In 2013, Google forked WebKit to make Blink and nowadays, Microsoft, Opera, Brave and others have picked Blink/Chromium for their new browsers.

Even as Mozilla is making great strides with updating its engine (was Gecko; now Quantum), nobody else is going on that trip with them.


KHTML was always designed and positioned as an embeddable browser engine. Mozilla deprecated the embedding of Gecko, so you have to fork and change the whole browser instead of just lifting the engine...


I like JavaScript... it’s very flexible and incredibly expressive. Using c# lately, I just feel shackled


Moving for any modern language you know well to any other modern language will feel like that. You need to spend time learning. It has nothing to do with the what the language is capable of.

"I can code in X so I should be able to jump in to any other language and get to speed instantly." is obviously wrong.


I'm the exact opposite. Having a compiler help you avoid an entire class of bugs is superb.


What can you express in JavaScript which you cant express in C#?


Serialization for one thing. You can work with JSON extremely freely without creating weird serializable classes for every combination of data you might need to work with - eg, no class named "DoodadList" for when you want to de-serialize a JSON list (maybe that's a Unity3D thing?).

You can nest functions nicely and work with closures when it makes sense, if you like that sort of thing.

The async programming model is also really nice to work with.

You also don't need to create classes for every noun, verb, and adjective in your system either - when all you need is a function, you just write a function, not some weird object to hold it.

You also don't have to write a f after all of your decimal values to tell the silly compiler that you mean for 0.25 to be a float. (this one truly does not matter, but there are a lot of little things like this that add up)

I know you can do a lot of that in C#, but its just so effortless in javascript. You just need to be more disciplined about how you code it


You are right about having to create a class to hold a function, that is annoying. But C# do support nested functions and closures. I don't really understand your other points. A literal 0.25 in C# will be parsed as a double precision. If you want it to be a float (less precision) you use the F postfix. But JavaScript doesn't even have the float/double distinction.


What can you express in C# which you cant express in Assembler?


Expressions and functions for example. Assembler is really low level, it doesn't even have control structures. But C# seem to have everything JavaScript has and much more, so I just wondered why the parent post found JavaScript more expressive.


Looping over properties of an object is painful in C#.


Under a 2 week deadline. I challenge you to do better.


Most likely he had been thinking about the project for some time. But the 10-days-execution story sounds much nicer


I joined Netscape on April 3, 1995 but in the server team, due to a temporary requisition shortage. I worked on what would eventually become HTTP 1.1, which we wanted to be more like SPDY or HTTP 2. Therefore I had only spare time to think about what became JS, and I used it to study HyperTalk, Logo, and other languages, not just Scheme or Self.

I finally got transferred to the client team one whole month later, in early May. Then I had ten days to demo-day.

Why do you feel compelled to make up a story? Because it sounds nicer to you to denigrate my work, it seems.


> Why do you feel compelled to make up a story? Because it sounds nicer to you to denigrate my work, it seems.

Because randos on the internet (especially business types) love to make stuff up in the name of puffery and deifying. Legends are rarely true.

Thank you for clarifying.


You are a business type?


Yes, sadly. I'm well aware of our capacity for bullshit and cargo-culting


Not that you need it or anything, but I'd like to thank you for your work on Javascript - without it I might never have gotten started with programming.

So, thank you very much for laying down the foundation for a whole generation of new programmers!


He was... kind of. My understanding is Eich had been thinking for a while about the idea of bringing a version of Scheme into the browser. He was lured to work for Netscape by the promise that yes, he could do this. Unfortunately the business decision came down that the language's syntax had to approximate Java. So the semantics of the language had probably been settled in his mind for quite some time, but the syntax change still makes the 10 days an impressive feat. (And also explains a lot of the weirdness in JavaScript -- you're writing code and expecting it to behave like a C-like, but you're actually kind of writing quasi-Scheme and you don't know it.)


I've spoken and written about the early days, e.g., here:

https://www.youtube.com/watch?v=aX3ZABCdC38

Friends from SGI recruited me (second attempt) in March 1995, I joined in early April but in the server group. I thought a lot -- but worked too little due to server commitments -- during the month of April, about "the scripting language" which was suggested to be Scheme when I was being recruited, but which by the time I joined could not be Scheme, due to the impending Java deal between Netscape and Sun.

Java meant either no scripting language, or a kid-brother language, which meant C-like syntax, primitive vs. object types as in Java, and other unfortunate consequences.

When I transferred to the client group in early May, I had to produce a demo very quickly. I chose first class functions and (barefly there at first) prototypes as the building blocks. The rest is history.


So it sounds roughly one month of thinking and researching, then 10 days of coding?


That's what I wrote, yeah. With constraints going from "Come do Scheme!" to "make it look like Java" and even "feel like Java" because interop, via what we hoped would come, and did in Netscape 3, as a JS/Java bridge called LiveConnect.

The Belgium Post built a whole web app+service architecture on LiveConnect.

Think of LiveConnect as "Active Scripting" on MS's platform, which enabled Java components to be developed and glued together by JS.


Thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: