Link Details

Link 109495 thumbnail
User 329774 avatar

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?
  • 11
  • 0
  • 1321
  • 448

Comments

Add your comment
User 221312 avatar

pentolino replied ago:

0 votes Vote down Vote up Reply

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.

User 305891 avatar

rspeed replied ago:

0 votes Vote down Vote up Reply

@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:


{function(){
function() {...}
function() {...}
function() {...}
function() {...}
}();

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (11)



Voters Against This Link (0)