Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Tango Function Naming

Posted: 01/26/08 01:16:11

Hello everyone,

I have recently started, and given up, Pineapple, a "standard library," much like Tango. It was going to be simple to use but great in functionality. After some coding I gave it up, the work load was too great for one person. Besides that, Tango is already complete and close to what Pineapple would have become. The only large difference is the naming of function names. For example, I would call the FileConduit?.seek function FileConduit?.setPosition. Or, DeviceConduit?.write would be instead DeviceConduit?.writeData. text.Util.replace would become text.Util.replaceStringWithString.

In other words the function names would be increased in length a little but would be greatly increased in readability. I would patch all the names myself if it were not for the fact that Tango is too large for me to do it alone. Could the names be changed by everyone? I would simply love that!

Great work with Tango thus far!

Peace, Alan

Author Message

Posted: 01/26/08 08:40:59

Hiya Alan :)

I'm really grateful for your interest in Tango, and as you'll see from our contributors list, such a library is indeed way too much work for one person.

Now, for your suggestions;

I can say from the start that although your suggestions are sound, they won't happen. Tango do get quite some criticism, especially from those who don't use Tango, and when it is related to naming, it always claims that names are too long and hierarchies too deep. Now, as you have just shown, names are generally not long at all in Tango, but rather we strive for them to be short and concise. From the context (the type of the object), you should always be able to understand the meaning and making the function names longer would not yield any particular win. You would be surprised how many are afraid of typing too many characters :)