Live data from Hacker News

JavaScript at 20

brendaneich.github.io

211–220 of 327 posts

Re: JavaScript at 20

#211
post #125

Earlier quoted context omitted.

[deleted]

> In Java you legitimately have alternatives, since the alternatives can make the same raw OS calls that the java.util.Date library does. Not so in JS. So instead we HAVE to work with Date and work around its many warts. Uh, what? Yes, JavaScript's Date is the only way to get at that browser/OS stuff. So an alternative will use Date underneath to obtain that information. That doesn't mean the end-user has to work wit…

I'll add that timezone information shifts politically over time... It'll never be consistent... your best bet is to ship all dates in UTC as much as possible (which `.toJSON` does) and display in local (which `new Date(jsonstr)` does).

Dates are evil, even in C# with offsets it's not easy... and that's probably the best implementation of dates, with consistent updates I've seen.

Re: JavaScript at 20

#212
post #63

I have learnt that if I click a javascript post and see a title and author slash screen and nothing else apparently I must start using my right arrow button.

I have to admit I kind of despise these 'slideshow pages'. They needlessly break the web for a gimmick.

Some have the visual Arrows in a corner, which makes it easier to distinguish...

Re: JavaScript at 20

#213

JavaScript at 20... apparently doesn't work. I load the page and get a big rectangle that says "JavaScript at 20" and "Brendan Eich" with a link to his Twitter, and nothing I do on the page takes me to the rest of the presentation.

Its insane but press the right arrow button.

Re: JavaScript at 20

#214
post #69

JavaScript is like English. It incorporates the best parts of other languages. Starting from Java, you can now see the clear influence of Python in ES6/7 with generators and string templates. I think this is JS's greatest asset.

Like a ball of greasy dirt rolling through a jewelry market. Is the end result beautiful or just the individual features?

Re: JavaScript at 20

#215

"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…

I'm one of the people who says JavaScript is the worst thing to happen to the web, and I don't need an alternative to say that, because my issue is with what JavaScript does, not how it does it. An alternative that does the same thing wouldn't solve my complaint. I don't want a web where all my software and data is owned by other people who don't have my best interests in mind. JavaScript allows "free" websites to re…

You're misplacing the blame.

Re: JavaScript at 20

#217
post #35

Cool presentation, but holy shit, taking ~2 minutes to load on FF and freezing the browser is not.

My issue with it is that I click on the Hacker News link, step through the slides and then want to return back to the hacker news discussion to read the comments. Unfortunately, each slide is treated as a new history item and Firefox only remembers a finite amount of them so I then get stuck on the presentation with no way to get back to the site I was on before. Tempted to just inject this into each page I visit sin…

So, if you're on a search results page, and click next 20 times and then click back, do you expect to go back to the search form, or the previous results page?

Re: JavaScript at 20

#218

Earlier quoted context omitted.

There's a whole world of problems to fix before you even get to the problem of Javascript. Right now, the world only has 3.5 base browser engines. Those browser developers have no interest in adding a new standard language like Python, even though more people prefer that to Javascript. So, if you were to develop a new browser language, you need to build a new browser from scratch, and then move a billion people to it…

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 bonus points, how much prettier than ES6).

While we're at it, as a general rant... I think it's weird that Python keeps coming up in these conversations.

It's a nice language, it really is. But it's in the same paradigm set and productivity class with JavaScript, Ruby, and Perl (and to a lesser extent, even PHP). The differences between these languages aren't that big and they're largely aesthetic.

If you prefer it, that's fine. If you find its particular set of choices aggregate some nice marginal gains to some additional productivity over the other languages I've listed in this class, I might even think that's a credible argument.

But if you can't get past the sting from JS's warts and learn to be largely as effective in it as you are in Python -- or if you think the real solution moving forward is to turn the entire fleet of supertankers involved in the web for retooling to use a language that's not that different -- I think that you're not thinking about your tools particularly keenly or carefully.

Re: JavaScript at 20

#219
post #192
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…

I suspect that it might be simple to make something like JS in 10 days when you can effectively delegate the heavy lifting of making it fast etc. (see last slide) to many other people after it has become ubiquitous. :)

I wrote my own interpreters for my own languages, including stuff used in production. 10 days for designing and implementing something like JavaScript is pretty good.

Also, I think that the number of problems in JS normalized by the time it took to make the first version (and that time limit was due to a deadline that the creator did not choose) is very likely smaller than in many, many other languages, if not all the remotely popular ones.

Re: JavaScript at 20

#220

"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 correct solution is to write a DOM interface for Python and start distributing browsers with Python VMs. Python's not a perfect language but it's much better than JavaScript. There are acceptable alternatives besides Python too, but that would be my favorite. I don't see why we need to invent a whole new scripting language for client-side execution on the web, the problems really aren't that special. I know the history of JavaScript and I'm not saying it didn't serve a purpose for a time, but that time has passed; it's time to move on and put in a big boy programming language.
Post reply on HN