July 18, 2008
"dsimcha" <dsimcha@yahoo.com> wrote in message news:g5oajj$2rfe$1@digitalmars.com...
> Reading in a file.  Yes, Phobos has streams for when you actually need
> serious
> features, but it has the dead simple read() function that doesn't require
> instantiating a class or anything like that just to read a file into an
> array of
> bytes.  To be perfectly honest, the only parts of Tango I've really looked
> at hard
> are the threading and math stuff, since Tango is still basically for D1
> only and
> otherwise I haven't had a problem with Phobos, but AFAIK Tango is much
> more OO and
> verbose than Phobos.  This isn't really a knock against it, it's really
> just
> personal preference, not that one is "better" than the other.  On the
> other hand,
> Phobos just doesn't have a lot of the features I'd like.

I just don't know how to answer.  I've never found "File("filename").read()" to be particularly awful.  It's not really any more OO than Phobos in most places.

More verbose -- that's improving.  Much of the verbosity in some of the lower level functions is for performance (like passing buffers for output), and I can't tell you how often I've been thankful for those lower-level interfaces.  There are an increasing number of "convenience" methods and functions.  That's one nice thing about Tango: if you _don't like_ something, _let the developers know_ and _they will do something about it_.

A cursory glance over the documents will also not give you what you need to decide whether or not you like the library.  I didn't like Tango at first, but after a month of using it I came to realize how much better-designed and flexible it is.  Not having to duplicate 800 lines worth of functionality in every one of my projects for such simple things as array manipulations and string functions that operate on types other than char[] was also a nice bonus.

So I know what you'll reply with next, "oh, well it's _too big_ for me, I need a smaller library."  Give it up.  That's a horrid argument and you know it.


July 18, 2008
Jarrett Billingsley wrote:
> "Bill Baxter" <dnewsgroup@billbaxter.com> wrote in message news:g5ocsa$2v3b$2@digitalmars.com...
>> Jarrett Billingsley wrote:
>>> "dsimcha" <dsimcha@yahoo.com> wrote in message news:g5o4g7$2f5i$1@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.
> 
> --! I mean ------ come on.  You call a method of a statically allocated object.  As if that's really different? 
> 
> 

I have detailed in enhancement reports posted to the Tango tracker why it makes a difference, so I'm not going to repeat myself here.

--bb
July 18, 2008
Bill Baxter wrote:
> Jarrett Billingsley wrote:
>> "Bill Baxter" <dnewsgroup@billbaxter.com> wrote in message news:g5ocsa$2v3b$2@digitalmars.com...
>>> Jarrett Billingsley wrote:
>>>> "dsimcha" <dsimcha@yahoo.com> wrote in message news:g5o4g7$2f5i$1@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.
>>
>> --! I mean ------ come on.  You call a method of a statically allocated object.  As if that's really different?
>>
> 
> I have detailed in enhancement reports posted to the Tango tracker why it makes a difference, so I'm not going to repeat myself here.

Not meaning to sound too stand-offish there.  Actually, I don't totally recall what the problems I had with it were, and I don't have time to go look it up now.

But I do find it quite typical when dealing with several Tango folks, this pattern of:
A: "oh come on -- tango is not really X! give me an example!"
B: <example provided>
A: "Pffft -- you're silly, go away."

That is most definitely off-putting.

--bb
July 18, 2008
"dsimcha" wrote
> 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,
> but I like Tango's extra math and threading stuff and richer feature set
> in
> general.  Also, I've written a decent amount of Phobos code that I don't
> feel like
> porting.

The D2 branch of Tango currently doesn't compile, and won't compile until we have some enhancements from D2 that I believe are necessary for Tango to retain it's abilities.

When this does happen, I'm sure tangobos will follow rather quickly.

-Steve


July 18, 2008
"Bill Baxter" <dnewsgroup@billbaxter.com> wrote in message news:g5ovgi$2dip$1@digitalmars.com...
> Bill Baxter wrote:
>> Jarrett Billingsley wrote:
>>> "Bill Baxter" <dnewsgroup@billbaxter.com> wrote in message news:g5ocsa$2v3b$2@digitalmars.com...
>>>> Jarrett Billingsley wrote:
>>>>> "dsimcha" <dsimcha@yahoo.com> wrote in message news:g5o4g7$2f5i$1@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.
>>>
>>> --! I mean ------ come on.  You call a method of a statically allocated object.  As if that's really different?
>>>
>>
>> I have detailed in enhancement reports posted to the Tango tracker why it makes a difference, so I'm not going to repeat myself here.
>
> Not meaning to sound too stand-offish there.  Actually, I don't totally recall what the problems I had with it were, and I don't have time to go look it up now.

I believe the main functional complaint (not style-based) is that you cannot alias it.

-Steve


July 18, 2008
"Bill Baxter" <dnewsgroup@billbaxter.com> wrote in message news:g5ovgi$2dip$1@digitalmars.com...

>>
>> I have detailed in enhancement reports posted to the Tango tracker why it makes a difference, so I'm not going to repeat myself here.
>
> Not meaning to sound too stand-offish there.  Actually, I don't totally recall what the problems I had with it were, and I don't have time to go look it up now.
>
> But I do find it quite typical when dealing with several Tango folks, this
> pattern of:
> A: "oh come on -- tango is not really X! give me an example!"
> B: <example provided>
> A: "Pffft -- you're silly, go away."
>
> That is most definitely off-putting.

I'm sorry if it came across that way, but it's equally frustrating when people seem to find the tiniest reasons to _dis_like Tango when there are so many other reasons to like it.  It's like complaining about a scratch on the dashboard of a Porsche, or a single stuck pixel on a 1680x1050 flatpanel with sub-5ms response time.  <sarcasm no personal experience behind _that_ statement />


July 18, 2008
dsimcha wrote:
> 
> 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,
> but I like Tango's extra math and threading stuff and richer feature set in
> general.  Also, I've written a decent amount of Phobos code that I don't feel like
> porting.

There's no timeframe for D2 support at the moment.  I may look into at least having the runtime be cross-compatible, but porting the user code would require changes in structure / coding strategy that I can't see anyone wanting to make.


Sean
July 18, 2008
Sean Kelly wrote:
> dsimcha wrote:
>>
>> 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,
>> but I like Tango's extra math and threading stuff and richer feature set in
>> general.  Also, I've written a decent amount of Phobos code that I don't feel like
>> porting.
> 
> There's no timeframe for D2 support at the moment.  I may look into at least having the runtime be cross-compatible, but porting the user code would require changes in structure / coding strategy that I can't see anyone wanting to make.

It seems to me that some people do actually like D2 and aren't using Tango precisely because there's no D2 support.  So who knows, maybe you'll find there's a new crop of D2/Tango volunteers that show up once the ball gets rolling.  Steven S. for one, perhaps.

--bb
July 18, 2008
dsimcha wrote:
> Reading in a file.  Yes, Phobos has streams for when you actually need serious
> features, but it has the dead simple read() function that doesn't require
> instantiating a class or anything like that just to read a file into an array of
> bytes.

So use tango.stdc.stdio.  Seriously.  I know some Tango folks would probably not agree with this suggestion, but it's portable, fast function-based IO.

> What I personally would like to see in the ideal world is for Phobos to become
> analogous to the C++ standard lib, i.e. simple in both features and API, very
> highly tested and optimized, "official", etc. and for Tango to become analogous to
> Boost, i.e. more complex, feature-rich, etc. and more of a "standard add-on lib"
> than a second "*the*" standard lib.  However, IDK how much they've diverged and
> whether using them together will grow more or less feasible with time.

It's obviously a matter of opinion, but I think Tango has a better runtime and overall low-level support than Phobos, so I question the suggestion to make Phobos the core to build upon.

Regarding Tango in particular--our goal was always to have Tango be modular and lightweight, and although Tango has grown a bit beyond this I think it's still a more lightweight library than Phobos insofar as executable size is concerned.  Modules in Phobos tend to have far more dependencies than those in Tango, for example, so you'll often find that by importing something that seems pretty basic you'll end up pulling in a ton of other stuff as well.  Worse, the runtime code pulls in this stuff as well because it calls various user packages for runtime-level work.  Phobos is fine for everyday applications programming but I personally wouldn't choose it for a serious systems app (still obviously my own very biased opinion of course).


Sean
July 18, 2008
Bill Baxter wrote:
> Jarrett Billingsley wrote:
>> "dsimcha" <dsimcha@yahoo.com> wrote in message news:g5o4g7$2f5i$1@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?  The Tango IO package is largely class-based because it allows for a lot more flexibility.  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.


Sean