Hacker News new | past | comments | ask | show | jobs | submit login

While I feel that most of the article is little more than reaching for straws, he does make some good points about memory management in Javascript and on mobile.

Garbage collectors should be optional. I would really love to be able to handle my memory directly if possible, and while there are some things I can do related to object pooling, I lose control over that with closures and a more functional approach.

I guess to counter my own argument here I will say that for most resource intensive things like simulations (call them games if you will), an object-oriented approach does a better job of modeling than a functional one. Game loops, sprites, bullets flying around... go OOP... and then use an object pool and limit your use of closures. Is it a pain in the ass? You bet, but so is having to manage the heap on your own.

Now, as for the rest of the article, the author did a LOT to discredit himself insisting that JS performance will not increase over the next few years... dude, come on, winning isn't as important as learning and discussing, and you're clearly just trying to WIN an argument.

This article is not very balanced. It is basically just saying that all software written for a VM is stupid. That the concept of Garbage Collection is an abomination.

The truth is that VMs are incredibly successful and aren't going anywhere. I mean, look at the rise of VPS! Now compiled C and even machine code aren't running as fast as they could be! Run for the hills!

Performance is not the be-all, end-all of computing. We're a social species and the reason that JS is the so successful has more to do with the fact that it is hosted in a VM based on open standards than anything else.

So why have we moved to virtualization? Because it makes a LOT of sense. It's the same reason we invented compilers and higher-order languages in the first place... we're human. We are the ones writing and reading source code... the machines don't, they just blindly follow instructions. We choose to sacrifice speed for a more humanistic interaction with our machines, and that applies just as much to programmers as to the people who just use programs.

These are very early days for mobile computing. You say you want to raise the level of discourse? Well then do it by writing articles that are more about discussing solutions than winning. For example, HTML5rocks.com (and yes, I am fully aware of the HTML5 marketing machine..) has been writing some good articles on memory management in Javascript, and that approach actually raises the level of discourse.




I'm not sure how closely you actually read his post because he doesn't say anything you attribute to him about software written for VMs being stupid--in fact he explicitly states that it makes a lot of sense in desktop environments because it improves programmer productivity. He's got a heading, in all caps, saying "GC ON MOBILE IS NOT THE SAME ANIMAL AS GC ON THE DESKTOP", and he quotes, while indicating agreement with, guys like Herb Sutter and Miguel de Icaza explicitly stating that managed languages make tradeoffs for developer productivity. Which they do, and those tradeoffs don't really work on mobile (and won't until we see significantly improved memory density, among other things).

Disagree with him if you want to--I'd like to, because I like the JVM and the CLR, but he has the weight of evidence on his side--but can we not make stuff up?


> This article is not very balanced. It is basically just saying that all software written for a VM is stupid. That the concept of Garbage Collection is an abomination.

Er, no it's not; it's pointing out a number of ways that it's problematic for GUI apps (and especially games) on highly resource-constrained mobile devices.

> The truth is that VMs are incredibly successful and aren't going anywhere. I mean, look at the rise of VPS!

He wasn't talking about that sort of VM.




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

Search: