On Sunday 07 May 2017 12:05:40 Graeme Geldenhuys wrote:
> On 2017-05-07 08:20, Martin Schreiber wrote:
> > MSElang and MSEpas (a subset of Free Pascal) have "string8" (utf-8)
> > "string16" (utf-16) "string32" (ucs-4)
>
> That sounds good.
>
> > and "bytestring" for any 8-bit encoding and
> > binary data.
>
> Why this? Why not simply Byte or an array of bytes. The term "bytestring"
> introduces confusion again.
>
Because of compatibility with string8 where the index base can be 1 and string 
concatenation.

> Also why bother with any other text encoding than the Unicode standard. The
> Unicode standard was designed to support ALL languages and finally get rid
> of the 8-bit mess. All you need is conversions from all the 8-bit encodings
> to Unicode, and then be done with it.
>
You probably never made software for bus systems and communication with 
hardware devices. There it often happens that bytestreams contain binary and 
text components. A reference counted buffer datatype which can be 
concatenated from strings and binary data is convenient and effective.

> >>    Java makes this simple. One string type (class), one character type
> >> and 8 other primitive data types. Much simpler and easier to understand
> >> than the mess Object Pascal has, thanks to FPC and Delphi.
> >
> > MSElang has been designed as a high performance language so it can't be
> > so simple.
>
> Huh? Java is an excellent performance language. Please ignore all
> statements on the Internet older than say 5 years. The Java language has
> come a long way, and is *very* fast now. In fact, it actually generates
> binary code that is magnitudes faster than what FPC can achieve.

There are situations where 8 bit string code units are the best, there are 
others where 16 bit codeunits are appropriate and some where 32 bit codeunits 
provide the best performance. I like to control that myself instead to use an 
opaque string class.

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to