Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Is a "series" aka an "array"

From: carl:cybercraft at: 5-Nov-2010 5:14

On Thursday, 4-Novenber-2010 at 22:45:03 Duke Normandin wrote,
>> As another quick example, there's a datatype called number! that both >> integer! and decimal! fall under. > >I've been thinking the very same thing! But is "number" the data-type, >or integer and decimal the data-type (as in other languages). You see?
number! and series! are called pseudo-types to distinguish them from the other, normal datatype.
>I don't see the point, e.g. using the Pascal family paradigm, of having >LONGINT, INTEGER, SHORTINT, REAL etc, which are data-types, and giving >them the collective name of "numbers". What would be the point?
Well, if you're doing maths you can then check if the data is a number...
>> integer? 7
== true
>> integer? 7.5
== false
>> number? 7
== true
>> number? 7.5
== true
>In REBOL, the functions that operate on a "block", also work on a >string, also work etc etc etc. So is a "series" some OOP super CLASS >or something members inherent all those methods (functions).
I'll leave others to answer that since my experience of class and such in other languages is limited. -- Carl Read.