Google Groups Home
Help | Sign in
Message from discussion Collection.size behavior
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Arne Vajhøj  
View profile
 More options May 1, 7:52 pm
Newsgroups: comp.lang.java.programmer
From: Arne Vajhøj <a...@vajhoej.dk>
Date: Thu, 01 May 2008 19:52:14 -0400
Local: Thurs, May 1 2008 7:52 pm
Subject: Re: Collection.size behavior

Mark Space wrote:
> Benjamin wrote:
>> Does anyone know the reason that Collection.size returns
>> Integer.MAX_VALUE when the the collection size is greater than that?
>> The reason I'm asking is because we, the Python (programming language)
>> developers, are considering imitating this with our sequences. It
>> seems to be that this is akin to silently lying and could be quite
>> confusing. Am I missing some practical benefit from this?

> I'm with you -- don't lie.

> I'd return a long, just to be safer, or maybe some equivalent of BigNum.

But changing that would make a lot of existing code not compile.

Arne


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google