Pause Self, Resume on Event

Bill Baxter dnewsgroup at billbaxter.com
Thu Jul 17 23:43:33 PDT 2008


Sean Kelly wrote:
> Bill Baxter wrote:
>> Jarrett Billingsley wrote:
>>> "dsimcha" <dsimcha at yahoo.com> wrote in message 
>>> news:g5o4g7$2f5i$1 at digitalmars.com...
>>>
>>>> On another note, anyone have any idea when/if Tango for D2, and 
>>>> Tangobos for Tango
>>>> for D2, will be available?  There are things I like and dislike 
>>>> about both Tango
>>>> and Phobos, and I really wish I could mix and match modules from 
>>>> them without
>>>> giving up my D2 features.  For example, I like Phobos's much simpler 
>>>> IO API, less
>>>> "OO everywhere" look and feel and "simple operations should be 
>>>> simple" mentality,
>>>
>>> Why does everyone say that Tango is "OO everywhere"?  There are free 
>>> functions (or static functions) that correspond to most free 
>>> functions in Phobos.  Please, please give me some examples of what 
>>> you believe to be "OO everywhere." 
>>
>>
>> One example: there are no stand-alone writefln/writef or readfln/readf 
>> functions in Tango.
> 
> Is your issue here cosmetic or something else?  

Ok, I looked them up.  Here are my issues with the stdio stuff in Tango:
http://www.dsource.org/projects/tango/ticket/903
http://www.dsource.org/projects/tango/ticket/908
http://www.dsource.org/projects/tango/ticket/1060

> The Tango IO package is 
> largely class-based because it allows for a lot more flexibility.  

That's great.  I don't see how you'll lose that flexibility by wrapping 
a function around Stdout that uses Stdout under the hood.  (Much like 
C's printf uses 'stdout' under the hood.)

> A function-based IO package couldn't easily support locales, for example. 
>  If this is a cosmetic issue then it would be trivial to alter the 
> calling convention to look exactly like writef / readf, but if it has 
> something to do with the involvement of objects at all then that would 
> obviously require a lot more work and the result would be much more 
> limited.  For this level of work I still suggest simply using the C 
> stdio routines.  After all, C++ doesn't even have function-based IO--it 
> simply wraps the C standard library as well.




More information about the Digitalmars-d-learn mailing list