Re: Just say 'YES' to strings

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

I have read these posts about strings with interest. Amazing how such a simple
question can spark such discussion.

I think firstly, and it's already been said, it's the job of the programmer to
keep track of whether a sequence is a string or not. This is not about language
structure I think, so much, as general programming period.

If I program in C, it's still my prerogative to make sure pointers to strings
are valid and accessable memory. It's not the job of the "language" itself.
That's programming.

In C it's the job of the programmer to  keep track of which of the many active
32-bit integers they have in use point to strings or not. What's the difference?

If you integrate strings into language, it gets *messy* fast. There are a myriad
of string functions already available in the win32api (why reinvent the wheel
twice?) they cover 7-bit, 8-bit and UNICODE strings already.

I haven't read all the posts on this - (my provider has server side spam
protection which is a little overzealous to say the least, and doesn't like
topica much). So excuse me if I am repeating:

If you integrate strings into the language you are opening a pandoras box,
quickly. If you wanted unicode strings, you have to call a whole different set of
Win32 API functions for it. If you start to use unicode stored as a sequence,
then mathematical operations start to screw it: try puts(1,{1,0,0}+'0') on a
unicode string. If you are talking about internal use within euphoria... what's
the problem? everything already works excellently.

I was surprised to read others reaction to that initial post. In 7 years of
programming in Euphoria, I've *never* had the problem of confusing a generic
sequence of garbage, or random data with a string.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu