Re: String?
- Posted by irv mullins <irvm at ellijay.com> May 31, 2004
- 652 views
Rolf Schröder wrote: > 3) For I know what I would like to read|write|print, Euphoria gives you the > opportunity to decide, what you would like to handle as a 'string' or not. > In practice I don't see any necessity to have a so called string type, it > makes no real sense. However, if you believe you need it, then use a > type function similar like that, what Nicholas Koceja has given as an > example. This is an 'opportunity' not unlike our recently-enjoyed 'opportunity' to pay income taxes. It obligates me to do lots of extra work, costing me time and money, and I seldom if ever see any benefits. The way I see it, is if in my program I declare "This is a sequence of human-readable characters\n", then clearly it was intended to be a sequence of human readable characters, and Euphoria should be smart enough to *remember* that for at least a few minutes, so later, when I want to display that sequence, Euphoria will do so correctly. If I had intended it to be {84,104,105,115,32,105,115,32,97,32,115... (perhaps a list of ages or weights or something) then I would have entered them as {84,104,105,115,32,105,115,32,97,32,115... wouldn't I? In the rare instance where someone might want to display the ASCII equivalents, or do "math" on that sequence, then *that* is where the programmer should have to go to extra lengths to coerce the data into some other form. Not every single time he uses it. > Do you really think a sting type makes sense in Euphoria? I don't! Absolutely. When I first started programming, computers were primarily for crunching numbers, and text was only a secondary concern. That day is long past. Irv