View mode: basic / threaded / horizontal-split · Log in · Help
February 18, 2005
Re: change from %FC to ü
In article <13dlov47jx79j$.kjil37ekdj16.dlg@40tude.net>, Derek Parnell says...
>> Can we have explicit casts between types with a specified encoding (the  
>> char types for example) cause transcoding, i.e. make it call toUTFxx
>
>Sounds nice, but I suspect that we need to have *both* capabilities
>available to the coder. Namely a way to tell the compiler to convert from
>one storage format to another, and a way to tell the compiler that even
>though the explicit data type is 'FOO' we actually want it to be treated as
>if it were really stored in RAM as a 'BAR'.
>
>This gives the coder and the compiler some useful flexibility.


You are right on the money WRT the asymmetry of cast semantics ~ but it does at
least do the same thing for all array types (char[]: paint) versus all single
element types (char: convert). 

That said, both capabilities noted above are available: use cast() for painting
an array, and use a method call to convert an array.

What's *still* missing is that ability to declare the type of an array literal
(AKA the w"text" and d"text") you noted earlier, so the compiler won't barf all
over it without an explicit conversion ~ it's one rather glaring issue in the
method-resolution chain. Walter has been aware of this issue for at least nine
months, but it has yet to warrant sufficient attention
Next ›   Last »
1 2
Top | Discussion index | About this forum | D home