[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Why no next! method in integer class ?

bradjpeek

7/11/2007 5:51:00 PM

Just curious...

The string class contains a next! method. Is there a technical
reason for not having a next! method in the integer class, or was it
just a language designer preference?

7 Answers

Trans

7/11/2007 5:57:00 PM

0



On Jul 11, 1:55 pm, bradjpeek <bradjp...@gmail.com> wrote:
> Just curious...
>
> The string class contains a next! method. Is there a technical
> reason for not having a next! method in the integer class, or was it
> just a language designer preference?

Integer is immutable.

T.


dblack

7/11/2007 6:02:00 PM

0

Robert Dober

7/11/2007 7:50:00 PM

0

On 7/11/07, dblack@wobblini.net <dblack@wobblini.net> wrote:
> Hi --
>
> On Thu, 12 Jul 2007, bradjpeek wrote:
>
> > Just curious...
> >
> > The string class contains a next! method. Is there a technical
> > reason for not having a next! method in the integer class, or was it
> > just a language designer preference?
>
> Probably both :-) The technical reason is that integers are immediate
> values, so you can't increment them. In other words:
>
> a = 1
> a.next!
>
> That would mean that 1 is now 2, which would not be good. In theory
> you could change the binding of a, so that it was now bound to 2
> instead of 1; but that's out of keeping with how these things
> generally work (e.g., with strings), which is that the object is
> mutated while the variable bindings are not affected. Doing it this
> way reinforces how objects and variables relate to each other in Ruby,
> and avoids having assignments that are masquerading as method calls.
>
> For more on this, search the archives for discussions on ++, which is
> absent from the language for very similar reasons.
Too kind of you David to omit my stupid RCR suggestion of
Integer#succ! and Integer#pred!, but it is worth searching for it as
things were explained very well in that thread.

BTW I am much smarter now ;)

Robert
--
I always knew that one day Smalltalk would replace Java.
I just didn't know it would be called Ruby
-- Kent Beck

BryanMag

12/8/2010 8:36:00 AM

0

On Dec 7, 8:02 pm, Gunner Asch <gunnera...@gmail.com> wrote:
> On Tue, 7 Dec 2010 16:35:26 -0800 (PST), BryanMag <bryanma...@yahoo.com>
> wrote:
>
> >On Dec 7, 7:29 am, Lon Jimmes <corvus...@gmail.com> wrote:
> >> HEADLINE: Pew Poll: Majority of Muslims supports death for anyone
> >> leaving Islam
>
> >> OVERVIEW: In a new poll by Pew, a shocking majority of Muslims says
> >> they support killing any person who wants to convert to anything other
> >> than Islam.This poll proves that many Muslims are dangerous and sick.
>
> >> LINK:http://www.examiner.com/american-politics-in-vancouver/pew-......
>
> >  WHO CARES? That's their problem, it sure doesn't effect non-
> >Muslims.
>
> so you support murdering those that change their religion and dont see
> it as a foundational indication that they are a very dangerous group of
> people.  Im curious..what is your opinion about their beliefs about how
> to treat Dhimmi?  You do have one..right?  You do know  you are a
> Dhimmi...correct?
>
> http://en.wikipedia.org/w...
>
> Interesting
>
> On second thought....I believe you to be a Dhimwit
>
> Dhim wit: A non-Muslim member of a free society who unwittingly abets
> the stated cause of Islamic domination. A dhimwit is always quick to
> extend sympathy to the very enemy that would take away his or her own
> freedom (or life) if given the opportunity.
>
> It is derived from the word Dhim mi: An Islamic term that refers to a
> subjugated non-Muslim person living in a Muslim society. Second-class
> status is confirmed by the legal system and dhimmis do not share the
> rights of their Muslim rulers.
>
> We will be waiting with interest for your response
>
> Gunner


Considering that the Muslim population is extremely low in the United
States and they lack the financial power to control the political
system I'd say you need to stop being so paranoid. Mexicans will be
the dominant ethnicity in America in the next 100 years, NOT MUSLIMS.
I recommend watching less Fox News as it appears to be rotting your
brain.

Gunner Asch

12/8/2010 11:16:00 AM

0

On Wed, 8 Dec 2010 00:35:49 -0800 (PST), BryanMag <bryanmagee@yahoo.com>
wrote:

>On Dec 7, 8:02?pm, Gunner Asch <gunnera...@gmail.com> wrote:
>> On Tue, 7 Dec 2010 16:35:26 -0800 (PST), BryanMag <bryanma...@yahoo.com>
>> wrote:
>>
>> >On Dec 7, 7:29 am, Lon Jimmes <corvus...@gmail.com> wrote:
>> >> HEADLINE: Pew Poll: Majority of Muslims supports death for anyone
>> >> leaving Islam
>>
>> >> OVERVIEW: In a new poll by Pew, a shocking majority of Muslims says
>> >> they support killing any person who wants to convert to anything other
>> >> than Islam.This poll proves that many Muslims are dangerous and sick.
>>
>> >> LINK:http://www.examiner.com/american-politics-in-vancouver/pew-......
>>
>> > ?WHO CARES? That's their problem, it sure doesn't effect non-
>> >Muslims.
>>
>> so you support murdering those that change their religion and dont see
>> it as a foundational indication that they are a very dangerous group of
>> people. ?Im curious..what is your opinion about their beliefs about how
>> to treat Dhimmi? ?You do have one..right? ?You do know ?you are a
>> Dhimmi...correct?
>>
>> http://en.wikipedia.org/w...
>>
>> Interesting
>>
>> On second thought....I believe you to be a Dhimwit
>>
>> Dhim wit: A non-Muslim member of a free society who unwittingly abets
>> the stated cause of Islamic domination. A dhimwit is always quick to
>> extend sympathy to the very enemy that would take away his or her own
>> freedom (or life) if given the opportunity.
>>
>> It is derived from the word Dhim mi: An Islamic term that refers to a
>> subjugated non-Muslim person living in a Muslim society. Second-class
>> status is confirmed by the legal system and dhimmis do not share the
>> rights of their Muslim rulers.
>>
>> We will be waiting with interest for your response
>>
>> Gunner
>
>
> Considering that the Muslim population is extremely low in the United
>States and they lack the financial power to control the political
>system I'd say you need to stop being so paranoid. Mexicans will be
>the dominant ethnicity in America in the next 100 years, NOT MUSLIMS.
>I recommend watching less Fox News as it appears to be rotting your
>brain.

So 911 didnt change the face, pace and outlook of the nation?

You remember 9-11 dont you? Where 19 of your beloved Muslim terrorists
crashed 4 airliners and changed America forever. They only killed about
3800 Americans in the act..but it will rock the nation for another
century to come.

Dhimwit indeed.

Now I note that you have avoided answering the question I posed you.
Or are you trying to avoid the questions posed, for fear your answers
will show you to be yet another mentally ill, far leftwing extremist
fringe kook?

Its a good thing that you will be dead in less than 2 yrs.


Gunner

BryanMag

12/8/2010 2:07:00 PM

0

On Dec 8, 6:16 am, Gunner Asch <gunnera...@gmail.com> wrote:
> On Wed, 8 Dec 2010 00:35:49 -0800 (PST), BryanMag <bryanma...@yahoo.com>
> wrote:
>
>
>
> >On Dec 7, 8:02 pm, Gunner Asch <gunnera...@gmail.com> wrote:
> >> On Tue, 7 Dec 2010 16:35:26 -0800 (PST), BryanMag <bryanma...@yahoo.com>
> >> wrote:
>
> >> >On Dec 7, 7:29 am, Lon Jimmes <corvus...@gmail.com> wrote:
> >> >> HEADLINE: Pew Poll: Majority of Muslims supports death for anyone
> >> >> leaving Islam
>
> >> >> OVERVIEW: In a new poll by Pew, a shocking majority of Muslims says
> >> >> they support killing any person who wants to convert to anything other
> >> >> than Islam.This poll proves that many Muslims are dangerous and sick.
>
> >> >> LINK:http://www.examiner.com/american-politics-in-vancouver/pew-......
>
> >> > WHO CARES? That's their problem, it sure doesn't effect non-
> >> >Muslims.
>
> >> so you support murdering those that change their religion and dont see
> >> it as a foundational indication that they are a very dangerous group of
> >> people. Im curious..what is your opinion about their beliefs about how
> >> to treat Dhimmi? You do have one..right? You do know you are a
> >> Dhimmi...correct?
>
> >>http://en.wikipedia.org/w...
>
> >> Interesting
>
> >> On second thought....I believe you to be a Dhimwit
>
> >> Dhim wit: A non-Muslim member of a free society who unwittingly abets
> >> the stated cause of Islamic domination. A dhimwit is always quick to
> >> extend sympathy to the very enemy that would take away his or her own
> >> freedom (or life) if given the opportunity.
>
> >> It is derived from the word Dhim mi: An Islamic term that refers to a
> >> subjugated non-Muslim person living in a Muslim society. Second-class
> >> status is confirmed by the legal system and dhimmis do not share the
> >> rights of their Muslim rulers.
>
> >> We will be waiting with interest for your response
>
> >> Gunner
>
> > Considering that the Muslim population is extremely low in the United
> >States and they lack the financial power to control the political
> >system I'd say you need to stop being so paranoid. Mexicans will be
> >the dominant ethnicity in America in the next 100 years, NOT MUSLIMS.
> >I recommend watching less Fox News as it appears to be rotting your
> >brain.
>
> So 911 didnt change the face, pace and outlook of the nation?
>
> You remember 9-11 dont you? Where 19 of  your beloved Muslim terrorists
> crashed 4 airliners and changed America forever.  They only killed about
> 3800 Americans in the act..but it will rock the nation for another
> century to come.
>
> Dhimwit indeed.
>
> Now I note that  you have avoided answering the question I posed you.
> Or are you trying to avoid the questions posed, for fear your answers
> will show you to be  yet another mentally ill, far leftwing extremist
> fringe kook?
>
> Its a good thing that you will be dead in less than 2  yrs.
>
> Gunner


Sure, 9-11 where building number seven that wasn't hit by a plane
at all pancaked like the other two buildings. LOL

You are just another Fox fag brainwashed to think that Muslims are
the most significant issue in the world. I'm not even left wing,
idiot.

Gunner Asch

12/11/2010 8:36:00 AM

0

On Wed, 8 Dec 2010 06:07:16 -0800 (PST), BryanMag <bryanmagee@yahoo.com>
wrote:

>On Dec 8, 6:16?am, Gunner Asch <gunnera...@gmail.com> wrote:
>> On Wed, 8 Dec 2010 00:35:49 -0800 (PST), BryanMag <bryanma...@yahoo.com>
>> wrote:
>>
>>
>>
>> >On Dec 7, 8:02 pm, Gunner Asch <gunnera...@gmail.com> wrote:
>> >> On Tue, 7 Dec 2010 16:35:26 -0800 (PST), BryanMag <bryanma...@yahoo.com>
>> >> wrote:
>>
>> >> >On Dec 7, 7:29 am, Lon Jimmes <corvus...@gmail.com> wrote:
>> >> >> HEADLINE: Pew Poll: Majority of Muslims supports death for anyone
>> >> >> leaving Islam
>>
>> >> >> OVERVIEW: In a new poll by Pew, a shocking majority of Muslims says
>> >> >> they support killing any person who wants to convert to anything other
>> >> >> than Islam.This poll proves that many Muslims are dangerous and sick.
>>
>> >> >> LINK:http://www.examiner.com/american-politics-in-vancouver/pew-......
>>
>> >> > WHO CARES? That's their problem, it sure doesn't effect non-
>> >> >Muslims.
>>
>> >> so you support murdering those that change their religion and dont see
>> >> it as a foundational indication that they are a very dangerous group of
>> >> people. Im curious..what is your opinion about their beliefs about how
>> >> to treat Dhimmi? You do have one..right? You do know you are a
>> >> Dhimmi...correct?
>>
>> >>http://en.wikipedia.org/w...
>>
>> >> Interesting
>>
>> >> On second thought....I believe you to be a Dhimwit
>>
>> >> Dhim wit: A non-Muslim member of a free society who unwittingly abets
>> >> the stated cause of Islamic domination. A dhimwit is always quick to
>> >> extend sympathy to the very enemy that would take away his or her own
>> >> freedom (or life) if given the opportunity.
>>
>> >> It is derived from the word Dhim mi: An Islamic term that refers to a
>> >> subjugated non-Muslim person living in a Muslim society. Second-class
>> >> status is confirmed by the legal system and dhimmis do not share the
>> >> rights of their Muslim rulers.
>>
>> >> We will be waiting with interest for your response
>>
>> >> Gunner
>>
>> > Considering that the Muslim population is extremely low in the United
>> >States and they lack the financial power to control the political
>> >system I'd say you need to stop being so paranoid. Mexicans will be
>> >the dominant ethnicity in America in the next 100 years, NOT MUSLIMS.
>> >I recommend watching less Fox News as it appears to be rotting your
>> >brain.
>>
>> So 911 didnt change the face, pace and outlook of the nation?
>>
>> You remember 9-11 dont you? Where 19 of ?your beloved Muslim terrorists
>> crashed 4 airliners and changed America forever. ?They only killed about
>> 3800 Americans in the act..but it will rock the nation for another
>> century to come.
>>
>> Dhimwit indeed.
>>
>> Now I note that ?you have avoided answering the question I posed you.
>> Or are you trying to avoid the questions posed, for fear your answers
>> will show you to be ?yet another mentally ill, far leftwing extremist
>> fringe kook?
>>
>> Its a good thing that you will be dead in less than 2 ?yrs.
>>
>> Gunner
>
>
> Sure, 9-11 where building number seven that wasn't hit by a plane
>at all pancaked like the other two buildings. LOL

You mean the building 7 that had a 10 story gash ripped in it, over half
a floor deep and was on fire? This Building 7?

http://en.wikipedia.org/wiki/7_World_Tr...


The conclusion:

"The collapse of 7 World Trade Center is remarkable because it was the
first known instance of a tall building collapsing primarily as a result
of uncontrolled fires.[32]

World Trade Center controlled demolition conspiracy theories say that
the building collapses on September 11, including that of building
seven, were the result of controlled demolition.[54][55][56][57] The
draft NIST report rejected this hypothesis, as the window breakages and
blast sound that would have occurred if explosives were used were not
observed.[58]

The use of thermate instead of explosives is discarded by NIST on the
basis that it is unlikely the necessary 100 pounds of thermate for each
steel column could have been planted without being discovered.[32]"


>
> You are just another Fox fag brainwashed to think that Muslims are
>the most significant issue in the world. I'm not even left wing,
>idiot.

Incorrect. You are indeed an idiot, and mentally ill. So you are
obviously a Leftwinger.

This is proven by you claim that anyone thinks Muslims are the "most
significant issue in the world" (other than other Muslims of course)

So you are claiming that cancer, lukemia, attackers, felons and muslims
are not issues to be concerned about?

Fascinating.

So..does your cave have an address, or do the land owner even know you
are living in his cave?

Gunner, back from LA