Polishing D - suggestions and comments

Sean Kelly sean at f4.ca
Sun Jan 27 10:04:43 PST 2008


Christopher Wright wrote:
> Jesse Phillips wrote:
>> On Sat, 26 Jan 2008 20:33:23 -0800, Kris wrote:
>>
>>> - You said "entire library infrastructure is based on classes", with
>>> perhaps a vague implication that's what Tango is about. This would be
>>> entirely false information, with the potential to mislead others. Phobos
>>> also has a number of classes, apparently in about the same ratio as
>>> Tango
>>
>> I would have to say that I have had the same perception as Dan here.
>> From a general glance, Tango looks like it is solely class based.
> 
> Tango has a lot more things that hold data than Phobos. Collections and
> datetimes, for instance. Some things it keeps as static struct methods,
> like WallClock.Now, for namespaces. The only thing I've really noticed,
> browsing through the source, is formatting and console IO being provided
> by classes. That's about three classes, total, that I've seen that could
> be done away with.

They could be wrapped in functions perhaps, but not done away with
entirely.  The formatting code lives in a class because it integrates
with the i8n features in Tango.  However, I think one could argue that
there should be a pre-existing, global formatter instance.

> But the result of replacing the formatting class with
> free-floating functions would be more verbose code, due to template
> arguments.

Yup.

> Solving this perception is a matter of advertising, not of changing
> code. That is unfortunate; changing code is much easier and faster.

I agree.  From what people have said, it seems like the greatest
obstacle Tango has to overcome is the first-glance or second-hand
perception of it.  Which is fare more difficult an obstacle than code
problems.


Sean



More information about the Digitalmars-d mailing list