Re: Just say 'YES' to strings (or not?)
irv mullins wrote:
>
>
> Matt Lewis wrote:
>
> >
> > I really like being able to treat my strings as not-strings (which maybe
> > we would still be able to do in a Eu-with-strings, so that may not
> > be a valid objection), as opposed to using specialized string functions,
> > and not being able to use the ASCII values as numbers without any
> > conversion.
>
> Do you really often add or subtract an integer from every character in
> a string? That's the only use I can see for treating strings as non-strings.
> You can't multiply or divide (and still have anything useful). Comparisons
> and appending will still be comparisons and appending regardless of how
> a variable is defined. The only affects of having a string type would be
> to prevent entering a non-printable character, and to remove the need to
> break a sequence into parts and choose different output routines based
> upon what we 'expect' to be stored there. And sometimes being surprised
> when something other that what we expect is actually there.
No, I don't think that I often perform arithmetic on every character.
It's more that I don't like having to do conversions (asc/chr-like)
or type casts on *single* characters, which I often use. I wouldn't say
this is a huge issue, but it's more than a non-issue (for me).
> > As stated before, my principle objection is that a new primitive datatype
> > would wreck Rob's data scheme, and the optimizations that we get because
> > of it. ...
>
> Perhaps he should have forseen that.
Perhaps. :) But I think he found a nice compromise. If we can come up
with a new scheme that doesn't sacrifice too much speed, then my concern
would go away. This would satisfy the, "You don't have to use it,"
argument for me. Basically, I perceive a small to zero benefit to me,
with a guaranteed, but unspecified cost. Shrink the cost enough, and
then I would "Just say 'YES' to strings." Not that it can't happen,
just that no one has figured out a way to do it yet.
Matt Lewis
|
Not Categorized, Please Help
|
|