Live data from Hacker News

JavaScript at 20

brendaneich.github.io

311–320 of 327 posts

Re: JavaScript at 20

#311

Earlier quoted context omitted.

Man, python on the server and in the browser. What a world that would be.

> Man, python on the server and in the browser. What a world that would be. If you're going to imagine that as a utopian alternative to JS, be sure to be thorough about it and imagine 1995 Python dominating the browser landscape for years and then the advancement path the language has taken on the server playing out among several browsers. Then come back and tell everybody how much prettier it looks than JS (for bonu…

I just prefer it to be honest, I like java script it just isn't as clean and readable as python to my eyes. And while I know nodejs exists I find flask and django to be much better alternatives (for me and the way I code/think).

Re: JavaScript at 20

#312

Earlier quoted context omitted.

> Just let me know when browser vendors are going to break down the two-tiered system, and let us run those myriad of alternatives alongside -- instead of under -- JavaScript. The complexity of doing that would be needlessly high compared to just improving JavaScript. Having to integrate a C++ DOM with a JS DOM is hard enough. Think about how you handle cross-language cycles… > Or, they could take their own medicine,…

>> Or, they could take their own medicine, and try and write the browser in JS. >You mean like Firefox? This is a very strange comment, especially coming from you. Everybody knows that the bulk of Firefox is not written in JS. You personally have spent years of your life working on a new programming language precisely because JS is not suitable for writing a web browser. I'll take your position on JS seriously when y…

It would actually be a very interesting experiment to try running Servo Emscriptenified (with SharedArrayBuffer, of course). I wouldn't want to write a browser in the full JS language, but that's precisely what asm.js is for.

"You should abandon Rust and write in JS" presupposes exactly the kind of strawman I've been arguing against. You don't have to abandon your favorite language!

Re: JavaScript at 20

#313

Earlier quoted context omitted.

Joke's not funny when you explain it.

Ok, I guess I have to explain it. (Kids these days!) I close with a slide containing bullet points rebutting all the dumb things said about how JS-can't-do-X, not to say how great JS is, but to show that software is hackable, and if Java, or Flash, or Dart can do X, so can JS. Evolving JS or doing something else is a matter of choice. JS's priority of place is not, it happened and it makes JS very hard to replace. Bu…

Turing Complete is soooo comfy!

Re: JavaScript at 20

#314
post #110

Earlier quoted context omitted.

Yes. There's just no substitute for time. It's impressive to see something put together quickly, but the result is inevitably lacking in some (or more) ways. In this talk, I couldn't decide whether his saying JS was written in ten days was a rueful admission that it's only natural for it to be a huge pile of shit, or some self-aggrandizement based on how quickly he managed to write it. I always found JS rather tastel…

Hume's Guillotine slices again! Please think through this keynote at a conference. I was asked to talk about the early days of JS. Why do you suppose that I am aggrandizing by describing "is" (or "was") as if "ought" can be derived in a moral sense? JS happened, I made it in ten days because it wouldn't have happened otherwise. Had I thought it through, I might have insisted on more time -- but then: VBScript. We don…

Ha! That'll teach me to be uncharitable.

I'm happy to retract my unkind supposition, especially after a gracious reply like that.

Re: JavaScript at 20

#315

Earlier quoted context omitted.

Doing good Python would help. You don't need the backslash on the first, making it a little cleaner: map(lambda x: x * 2, filter(lambda x: x % 2 == 0, [1, 2, 3])) But the list comprehension version is just completely wrong: [x*2 for x in [1, 2, 3] if x % 2 == 0] Which, in our subjective world, is cleaner than the ES5 version and almost as clean as the ES6 version.

> You don't need the backslash on the first, making it a little cleaner I was not trying to illustrate that the backslash made it ugly (I've removed it - I was pasting from a repl). It's ugly because of Python's lambda syntax and the fact it does not compose 'sensibly', as compared to fluid interfaces. The logic is back-to-front for one. > But the list comprehension version is just completely wrong: No, it's not at a…

What you're saying, then, is that it's terribly confusing [for you] when someone uses a list comprehension fully?

Presumably, these also are not completely clear to you:

    > [x * 2 | x  [x * 2 | x 
What, exactly, is not clear here? This is the essence of composition; to use clearly defined things together. I can appreciate a good pipeline as much as the next guy, but to say that this is somehow more complicated and hard to read is to overstretch a little bit.

To say that a pretty uncluttered list comprehension is some challenge to read is just hyperbolic. These pipelines, even with newlines, can get pretty long and terrible too.

Re: JavaScript at 20

#316

Earlier quoted context omitted.

Hume's Guillotine slices again! Please think through this keynote at a conference. I was asked to talk about the early days of JS. Why do you suppose that I am aggrandizing by describing "is" (or "was") as if "ought" can be derived in a moral sense? JS happened, I made it in ten days because it wouldn't have happened otherwise. Had I thought it through, I might have insisted on more time -- but then: VBScript. We don…

Just ignore the trolls, most of these naysayers have never implemented a new programming language in their life, but they feel entitled to talk about taste and morality.

Maybe we have implemented, maybe one maybe more than one. Aren't we allowed to say what we think?

Re: JavaScript at 20

#317
post #167

Every single presentation of Brendan has this "I made this in 10 days" thing, super annoying. JavaScript is a great example how your career can go pretty well if you're good at selling what you're building, even if it's not very good. This isn't meant as a "JavaScript sucks" type of comment, but as a "being good at presenting your work is really important" type of comment. Too many really strong engineers aren't good…

Every presentation is, for some people, the first one they are going to see about JS. It's a reminder of what is possible in 10 days, what the shortcomings may be and how long you may have to live with those shortcomings. It can't be repeated often enough.

Re: JavaScript at 20

#318

Earlier quoted context omitted.

> Works on OSes. We have a choice. No, it doesn't work on OSes. OSes only handle one language: the native machine code of that platform. Everything else must be compiled to it. This is exactly the same as browsers. Edit: At least two people disagree with me (-1 points) - would you mind elaborating why?

Your point is irrelevant, then difference then becomes the fact that at an OS level I can choose what code I compile into machine code and in the browser I can't.

No, for OS you decide which compilator to choose. As is with browsers. There are several languages (e.g. TypeScript, CoffeeScript, Dart) which can be compiled to JS.

That is not what I personally like (the processes of compilation and deployment I mean), but if you develop for OS then you have to compile before you run... In most OS.

Re: JavaScript at 20

#319
post #291

"Date hand-ported (h/t ksmith@netscape.com) from java.util.Date" I knew it!! The Date class is/was the worst thing about the Java library. It has confused a generation of programmers about dates and time zones. The main problem is that it's not a date, it's a time stamp.

For examples how a neat DateTime API can look like you might want to check out Dart's DateTime from the standard library: https://api.dartlang.org/apidocs/channels/stable/dartdoc-vie... or how Java 8 finally fixed DateTime inspired by Joda Time ( http://www.joda.org/joda-time/ ): http://www.oracle.com/technetwork/articles/java/jf14-date-ti...

Yeah, when Joda arrived, my Java programming life quality really improved.

Re: JavaScript at 20

#320

"Haters gonna hate." Anyone claiming that JS is the "worst thing to happen to the web" and/or that some other language would miraculously solve all of the problems present in JS should do the following, "Go create it." Don't whine about the barriers and how a new language would never be adopted because "JS is already everywhere." There are plenty of people already trying to solve this problem by actively doing someth…

The simplest solution would be to specify a VM for the web - that way people could use whatever language they like. Using JS for this purpose is suboptimal. This would require people like Eich to entertain alternatives to his diseased progeny.

Hi Peter, I hope you can see (or will soon see) that a specified polyglot VM for the Web is what I've been working on all along.
Post reply on HN