Tango - shallower hierarchy (was: Phango - questions)
Aarti_pl
aarti at interia.pl
Tue Nov 27 00:07:35 PST 2007
Sean Kelly pisze:
> Marcin Kuszczak wrote:
>>
>> Some more thoughts:
>>
>> tango.core
>> - it seems to be another general aggregate type for different things like
>> tango.util. But I would expect modules should be very low level, commonly
>> used stuff (not complex as opposite to util). That said I wonder why
>> there
>> is whole threading package in core? In what sense is threading 'core'? I
>> think that even on multicore machines it still be a lot of applications
>> which will be single threaded. What's more I found it counterintuitive:
>> when I want in my application threading support I would rather look for
>> tango.concurrency or tango.threading or tango.threads. In this package
>> should be also 'sync' package.
>
> tango.core is roughly akin to java.lang in Java. It is intended to
> contain essential type definitions, utilities, and expose runtime
> features. Threading is actually a runtime feature, which is why it is
> in core. tango.core.sync exists because I feel that simple threading
> primitives are an essential language feature. Any additional threading
> utilities will likely go in tango.util.concurrent or the equivalent.
>
>
> Sean
Now I understand. Thanks.
But still think that its not the best choice. Please notice that what
you said is more implementor point of view than user point of view. If I
want to use threads it's not important for me that its runtime feature.
I just want to make my job quickly without reading too much. Looking
for threads in Tango and seeing only main Tango hierarchy I have pretty
good chance that I don't find it at first time. I can of course have
"specific knowledge" and immediately go to tango.core. But necessity for
"specific knowledge" is worse than relaying only on "general
knowledge"/intuition, when creating libraries intended for wide audience.
It would be much better to put everything connected with threads into
one package IMHO.
BR
Marcin Kuszczak
(aarti_pl)
More information about the Digitalmars-d
mailing list