Re: "OF" in types, yet again...
- Posted by "Kat" <gertie at visionsix.com> Jul 04, 2004
- 485 views
On 3 Jul 2004, at 19:41, Robert Craig wrote: > > > posted by: Robert Craig <rds at RapidEuphoria.com> > > Al Getz wrote: > > > > Someone wrote: > > > > >sequence of sequence of integer s > > > > I doubt i would use that exact line anywhere, but i would > > DEFINATELY use this: > > > > sequence of char > > > > which would limit ANY element in this sequence to > > a whole number between 0 and 255, or hex #00 to #FF. > > > > I'd welcome this in a heartbeat, because from then on > > i'd be able to store text in single bytes with the same > > ease that i store anything else (usually) when using > > Euphoria. Presently, for every character stored there > > are four bytes used. > > Unfortunately, I would still want to store your > chars in 4 bytes. The main reason I don't store > chars in one byte now is because I'd have to > create a new *internal* data type that would > make the interpreter much bigger, buggier, > slower, and harder to maintain. What about being able to map chars or sequence or objects back onto allocated memory? Then Al could allocate some memory, point a sequential list of chars onto it, and then map a sequence onto it. Assuming, of course, when he assigns a value to the sequence, the char type checking is also performed (because the was value changed when the overlying sequence was changed). Kat