[REBOL] Re: Is a "series" aka an "array"
From: dukeofperl:ml1 at: 4-Nov-2010 22:45
On Thu, 4 Nov 2010, Izkata wrote:
> On Thu, Nov 4, 2010 at 8:25 PM, Carl Read <carl-cybercraft.co.nz> wrote:
>
> >
> > On Thursday, 4-Novenber-2010 at 18:59:10 Duke Normandin wrote,
> > >
> > >So... It seems that several REBOL data-types fall into an umbrella
> > >category called "series". Is there a particular reason for *categorizing*
> > >these data-types under the name "series"?
> >
> > For one, it means routines that are written to handle series will then
> > handle all the types that are series. ie...
> >
> > >> foreach value "abc" [print value]
> > a
> > b
> > c
> > >> foreach value [xxx yyy zzz] [print value]
> > xxx
> > yyy
> > zzz
> > >> foreach value %file.r [print value]
> > f
> > i
> > l
> > e
> > .
> > r
> >
> > -- Carl Read.
> >
> > --
> > To unsubscribe from the list, just send an email to
> > lists at rebol.com with unsubscribe as the subject.
> >
> >
>
> 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?
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?
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).
--
Duke