By asmith1
via razorspeed.com
Published: Sep 02 2008 / 10:40
Java language limits the size of a method to 64KB. Is this a bug or a feature? If you are working in a mixed environment that deals with both Java and dynamic languages, especially Rhino and JavaScript, you may run into this problem and It would easily result in days or even weeks of soul searching...The problem is not unique to JavaScript. It happens to JSP developers and so on. Is it time for us to re-consider this language limit?
Comments
pentolino replied ago:
I voted up because the post is interesting; but I think 64kb is not a problem. After all we struggle to keep methods small in favour of testing, putting a barrier on terribly long method is a good thing.
I think it is dynamic languages fault here, or to be more precise, a fault by their implementations on the jvm.
Just my 2 cents, of course.
rspeed replied ago:
@pentolino:
I agree and yet disagree with you. Yes, we should try to keep methods small in favor of testing, etc.
However, it is fairly common these days for JavaScript developers to wrap functions inside functions (inner functions). For example, you will see the following kind of code a lot on the web today:
Voters For This Link (11)
Voters Against This Link (0)