Phango - questions

Bill Baxter dnewsgroup at billbaxter.com
Mon Nov 19 00:47:09 PST 2007


Don Clugston wrote:
> Bill Baxter wrote:
>> Sean Kelly wrote:
>>> Bill Baxter wrote:
>>
>> Excellent flame-free technical post addressing the issues Sean.  Thanks.
>>
>>> I suppose one could argue that following the Java approach in Tango 
>>> results in unneeded redundancies, such as the DeviceConduit module 
>>> containing a DeviceConduit class, but again, I would argue that 
>>> choosing an arbitrary name to avoid these redundancies would reduce 
>>> clarity.  As it is, I know that if I want to use a DeviceConduit in 
>>> my app, I just have to import tango.io.DeviceConduit.  There is no 
>>> need to remember that the class actually lives in tango.io.blah instead.
>>
>> That does seem useful.  But is that true for every public class?  It 
>> may be working in Tango, but generally D doesn't really lend itself to 
>> Java's one-file==one-class.  (because D's only way to achieve 
>> 'friends' is to put two classes in the same file).  Also in Tango I 
>> see you have tango.math.Math which doesn't contain any class called 
>> "Math".
> 
> Quite true -- the fact that D allows free functions means that Java 
> styles are not sufficient.
> BTW - it used to be called tango.math.Core, the idea being that any 
> library could have its basic functions in a file called 'Core.d', but 
> unfortunately there were linker issues (can't have two obj files both 
> called core.obj).

Oh dang, I've been using dsss for so long now that I had blissfully 
forgotten about that particular D issue.  :-)

--bb



More information about the Digitalmars-d mailing list