What Happend To Tango Graphic's Package

kris foo at bar.com
Sun Sep 23 16:09:00 PDT 2007


Robert Fraser wrote:
> Tango's naming has always been an issue for me. I like the library, but many of their naming decisions (toUtf8 instead of toString, Seq instead of List, renaming close, etc.) have baffled me. I know in my heart they're just trying to get the most accurate names, but sometimes I just wish they'd use names similar to what other standard libraries use.

Oh, close() is still there, it's just that the low-level device 'close' 
(like socket disconnect, etc) was renamed so that close() itself could 
do something a little more useful by default. This change does not 
affect the overwhelming majority of code (in fact, there's just one 
dependency I know of, over which there was some early communication). 
That is, the change does not affect "user-level" code.

toUtf8() itself will very likely change when we make Tango compatible 
with phobos, so that might make some folks happy. That change could 
require a mechanical search/replace in user-code, but we'll very likely 
add an alias to ease that migration. That is, toString() and toUtf8() 
will likely map to the same this (at least temporarily).

The unholy trinity of toUtf8(x), toUtf16(x), and toUtf32(x) variations 
will (very likely) remain as is, since they have a different signature 
from toString() and are always provided as a trio. For instance, 
tango.text.String will retain those three stooges. BTW, that particular 
class will perhaps have to be renamed to tango.text.Text instead.

Hope that help to clarify things :)







More information about the Digitalmars-d mailing list