July 18, 2008
Bill Baxter wrote:
> 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.

Yup.  There has been enough interest that I think it's worth getting the runtime working at least.  The only real obstacle to that right now is time.  The runtime uses the standard C, Posix, and Win32 packages for various things and none of these are D2 compatible at the moment.  So the sticking point is really that I need to find the time to go through the standard C and Posix specs and add "in" to all the function parameters that are const in the C APIs.  I should have left /*const*/ as a placeholder when I created the modules but... oh well.  Live and learn.


Sean
July 18, 2008
Sean Kelly wrote:
> 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?  

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.


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 think it's a very important difference, actually. It makes it *feel* like as though Tango's been sucked into the ideology of putting free functions into a singleton object. And writefln() is the most visible function in Phobos. If someone says they prefer Phobos over Tango, most commonly, they mean they like writefln.

Making a simple wrapper/alias that calls Stdout -- AND MAKING IT STANDARD would, I think, do a lot for Tango, especially for first impressions.

July 18, 2008
Don pisze:
> 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 think it's a very important difference, actually. It makes it *feel* like as though Tango's been sucked into the ideology of putting free functions into a singleton object. And writefln() is the most visible function in Phobos. If someone says they prefer Phobos over Tango, most commonly, they mean they like writefln.
> 
> Making a simple wrapper/alias that calls Stdout -- AND MAKING IT STANDARD would, I think, do a lot for Tango, especially for first impressions.

...and - when same identifiers writefln/writef would be chosen - it will also make easier writing programs which can work with Phobos *and* Tango.

Also aliases string, wstring and dstring should be added to Tango for compatibility reasons.

BR
Marcin Kuszczak
aarti_pl
July 18, 2008
Bill Baxter a écrit :
> It seems to me that some people do actually like D2 and aren't using Tango precisely because there's no D2 support.

Or the other way around. I don't use D2 because there's no Tango support.
July 18, 2008
Aarti_pl wrote:
> Don pisze:
>> 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 think it's a very important difference, actually. It makes it *feel* like as though Tango's been sucked into the ideology of putting free functions into a singleton object. And writefln() is the most visible function in Phobos. If someone says they prefer Phobos over Tango, most commonly, they mean they like writefln.
>>
>> Making a simple wrapper/alias that calls Stdout -- AND MAKING IT STANDARD would, I think, do a lot for Tango, especially for first impressions.
> 
> ...and - when same identifiers writefln/writef would be chosen - it will also make easier writing programs which can work with Phobos *and* Tango.

Except that Tango is using .NET -style {1:x} formatting, instead of Phobos %x format. Otherwise I'd agree completely.

It would be nice if 'Hello world'-style programs would work on both Tango and Phobos.

> Also aliases string, wstring and dstring should be added to Tango for compatibility reasons.

Yes.

> 
> BR
> Marcin Kuszczak
> aarti_pl
July 18, 2008
"Sean Kelly" wrote
> Bill Baxter wrote:
>> 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.
>
> Yup.  There has been enough interest that I think it's worth getting the runtime working at least.  The only real obstacle to that right now is time.  The runtime uses the standard C, Posix, and Win32 packages for various things and none of these are D2 compatible at the moment.  So the sticking point is really that I need to find the time to go through the standard C and Posix specs and add "in" to all the function parameters that are const in the C APIs.  I should have left /*const*/ as a placeholder when I created the modules but... oh well.  Live and learn.

The Win32 package I believe is already updated in the D2 branch.  It was pretty easy, since Windows uses their funky type names for all parameters, I just had to add const to the type definitions, e.g.

alias const(char) * LPCSTR;

The Posix stuff, I don't remember if we updated.  But it did compile with D 2.007.  The latest compiler has some issues that make it impossible to use IFTI correctly with const variance, so for the moment, D2 is not an option for Tango.  Hopefully these are fixed soon.

My goal is to get Tango working on D2 for 2 reasons.  1, I like a lot of the new features, and would like to use them.  2, if Tango users are not using D2, it means that there are a lot of potential testers not finding problems in D2.  For bugs, this doesn't concern me a lot, but for design decisions that would make it impossible for Tango to build, I want to get those fixed before D2 is official, as Walter is really really, um.. really really a stickler for not changing design in a 'stable' release :)  In other words, I don't want to have to wait for D3 to come out in order to use Tango with it ;)

-Steve


1 2 3
Next ›   Last »