MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Re: Dynamic variable typing?



Followup to:  <Pine.OSF.3.92a.960723114530.4055A-100000@saul4.u.washington.edu>
By author:    Michael Brundage <anomaly@u.washington.edu>
In newsgroup: local.moo
> 
> If you're going to distinguish between binary strings and ordinary
> strings, then you might as well take the plunge and allow user-definable
> data types.  Ideally, the server would allow these to be created within
> the database (instead of at compile time).  Then we would need a uniform
> way to deal with these typed variables.  So then you could code
>    binary_string theData = "foo";
> and now theData is tagged as having type "binary_string".  Or maybe
>    latin1string theData = "something cool";
> 

Actually, a "binary string" is better handled as a byte vector -- the
current version of binary strings is a kluge (partially, I suspect,
because the MOO server could not easily be adapted for new data types
until 1.8.0beta1; I and Pavel had quite a brainstorming session to
figure out how to do FLOAT's.)

A byte vector is *not* a typed string (nor do I believe it is
warranted to do this in MOO); it is a fundamentally different data
type, which I believe it is warranted to add to the language.

	-hpa
-- 
PGP public key available - finger hpa@zytor.com
Key fingerprint: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
"The earth is but one country, and mankind its citizens."  --  Bahá'u'lláh
Just Say No to Morden * The Shadows were defeated -- Babylon 5 is renewed!!


Follow-Ups: References:

Home | Subject Index | Thread Index