Two standard libraries?
renoX
renosky at free.fr
Sat Jul 28 06:54:17 PDT 2007
Steve Teale a écrit :
> Sean Kelly Wrote:
>
>> Steve Teale wrote:
>>> It seemes to me that given Walter's definition of the language - a system programming language - that Phobos is closer to the mark. If users want a more object oriented standard library, that's all well and good, but it should be a shoe-in, then if you want to use the OO stuff you can, but code that's been written to work with Phobos should work unmodified with other libraries. (Note the recent discussion on C++ security).
>> While one might argue that it is easier to wrap a strictly procedural
>> library with an OO layer than vice-versa, I think the ease with which
>> any library may be encapsulated in a wrapper is more dependent on its
>> design (the assumptions it makes, how features are exposed, etc) than on
>> whether the interface uses functions or objects. That said, I don't
>> personally consider Tango to be an object-oriented library because it
>> does not require the user to define his own objects in order to use it.
>>
>>
>> Sean
>
> Sean, I take your point, and maybe should not have used the term "OO", but my idea of progress is:
>
> printf("X is: %s\n", toStringz(x))
> cout << "X is: " << x << endl;
> Stdout("X is: ")(x).newline;
> writefln("X is: %s", x);
I agree with you that cout or Stdout strike me as particularly ugly and
that writefln is a (small) progress over printf.
But when I see Ruby's way: puts("X is ${X}\n"); I can't help but feeling
that even writefln is not enough..
renoX
>
> rather than:
>
> printf("X is: %s\n", toStringz(&x))
> cout << "X is: " << x << endl;
> writefln("X is: %s", x);
> Stdout("X is: ")(x).newline;
>
More information about the Digitalmars-d
mailing list