Re: Euphoria vs The Other Guys --- and RTFM
- Posted by jaygade May 02, 2014
- 1775 views
Euphoria does not have a string data-type--conventional background expects it. In the past, there have been requests that a string data-type be added to Euphoria--conventional wish. Data storage for a sequence and for a dedicated string are not the same--conventional thinking sees this as a problem. Truly automated output of text data does not exist...for example console:display will sometimes show you a small integer instead of a character--conventional thinking does not understand this.
Euphoria behaves as if it has a string data-type--but not with conventional thinking. Text data in a sequence has unexpected flexibility--not conventional.
I guess I understand, but I still think that it's a symptom of over-thinking. Strings can either be first-class entities or they can be lists of numbers. BASIC and C, and Euphoria, generally treat strings as lists of numbers which are only treated specially by I/O functions. One key difference is that Euphoria uses 32- or 64-bit integers instead of 8-bit integers. Given the amount of storage today's computers have, storage shouldn't be an issue.
If a user truly needs strings of 8-bit integers, there is functionality in the library which provides for using C-style and memory-allocated strings.
I've never used console:display so I can't answer to its behavior. I pretty much stick with 'puts', 'printf', and '?'.
sequence s = "Hello" s += 0.1 ? s --> {72.1,101.1,108.1,108.1,111.1} puts(1, s) --> Hello
I don't know why someone would do that, but they're not prevented from doing it. It really speaks to the flexibility of Euphoria. I might expect puts() to throw an error or a warning in such a case (receiving a float instead of an integer).
So if you learn Python first, to what extent do you keep programing in Python when writing Euphoria code?
Also how much of my documentation is based on Fortran, PL/1, C, Pascal, APL, Snobol, ... ? How does this distort my explanations?
_tom
Sorry for being dense, but I'm still not understanding the context of the question. My stating that explaining to someone why they should program in Euphoria instead of those other languages is already pretty well handled in the manual I thought -- correctness, speed, and syntax comparisons. There should only be one small section of the manual dealing with that as introductory material.