Re: Euphoria 2.5 Features..... ??

new topic     » goto parent     » topic index » view thread      » older message » newer message

----- Original Message ----- 
From: "Isaac Raway" <isaac-topica at blueapples.org>
To: <EUforum at topica.com>
Subject: Re: Euphoria 2.5 Features..... ??


> 
> 
> I think perhaps you misunderstand me, so let me try again with more of 
> my own words.
> 
> I agree that Euphoria would benefit from having strings, however I 
> believe that they should be defined in terms of a sequence.

LOL.  Isaac, we are in complete agreement. This is exactly what I proposed for
the Euphoria about a year ago.

> I strongly disagree that a character is not an object. In the most 
> global sense of the word "object" (which is the sense we should employ 
> when discussing any change like this to a language), *everything* is an 
> object. Besides, a character can be easily defined in terms of the type 
> construct.

Yes you are correct, but I was using the term 'object' in the sense that
Euphoria uses it rather than the standard English meaning. And in the Euphoric
point of view, an object is not a character. And Euphoria does not have a
character datatype, even though (as you say), the type system could be used to
define one.

> I believe that the correct way to go about adding "strings" to Euphoria 
> is to modify the way a variable is define. So, if you wanted to define a 
> string as in the example you used, when you write
> 
> string Name
> 
> you are really saying to the language
> 
> sequence of char Name
>
> The langauge would then make optimizations for the variable Name so that it is
> stored in a way specific to the data type char. (Note that there may need to be
> the additon of a construct specifying this storage method.)

Yes! This is exactly what I proposed. And in the same manner we should be able
to say ...

  sequence of integer Scores

which would cause Euphoria to ensure that only integers were stored in the
sequence.

 
> Using this system allows much more felxibility and therefore would be 
> much more valuable if implemented than the addition of strings as their 
> own data type.
> 
> It is good to keep the the basic parts of a language as simple as 
> possible. If we only slightly modify the definition of sequence to by 
> either (a) an ordered set of arbitrary objects, or (b) an ordered set of 
> a given object type, then we have made a very valuable addition to the 
> language.

Yes it would.

-- 
Derek

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu