Standard Library Concerns (Phobos / Tango)

Jesse Phillips jessekphillips at gmail.com
Thu Feb 7 16:30:56 PST 2008


On Thu, 07 Feb 2008 19:06:23 -0500, Dan wrote:

> bearophile Wrote:
> 
>> Sebastian Beschke:
>> > Which is pretty much the point of OO.
> 
> The point of OO is to not know what you're doing?  Maybe that's why I'm
> so averse.
> 
> 
>> I agree, but the lesson here is probably that some people don't
>> understand OO well, or they don't want to use it everywhere, or it
>> doesn't go well with their mindset, or they need to go faster and they
>> want to program in a more C-style, etc.
> 
> It's the mindset, apparently.  I have no preference for syntax.  It's
> what's inside that counts IMHO, and with OO you have no idea what's
> inside.
> 
>>Java has OOP only, but D allows other kinds of programming too, so maybe
>>it may be better to not have a std lib that is fully OOP, so it can be
>>used when you program differently (like functional-style). Tango doesn't
>>need to be perfect for everyone, but probably there are ways to modify
>>its structure enough to make it look good enough for most people :-)
> 
> Agreed, but I'm continuing to use Phobos as long as it's better for me,
> and at the moment it still is.
> 
>> I know very little about Tango still, but I have seen there are lot of
>> people that think some changes may be in order before making it the D
>> std lib :-)
>> 
>> > If you want to understand something in Tango, you can still read the
>> > source code.
> 
> Yes, if I want to understand anything in Tango, I need to study.  I
> already understand Phobos because it's similar to what I already know.
> 
> You say that Tango presents better GC and IO?
> 
> I couldn't possibly allocate 16 consoles and iterate through them
> without an undefined number of cache misses - because I can't control
> where they exist.
> 
> I couldn't possibly define classes and use copy-on-write semantics to
> expand them during runtime; something that was key to my thinking in the
> Walnut 2.x project.
> 
> I couldn't possibly be informed about the memory footprint of my
> program, or understand how many mispredicted? branches are taken because
> of the possibly painful multiple-constructor system.  I also cannot
> partially instantiate an object if I only need part of it for some rare
> case.
> 
> I can keep going on the limitations of OO.
> 
> But essentially the point is that unless it's beautiful inside, I don't
> care how convenient your notation is.  If the insides on which your
> library is built is "don't look!" then I have trouble believing they're
> beautiful unless you have a whole slew (like, hundreds) of benchmarks to
> show me.
> 
> Regards,
> Dan

umm, you do realize that Tango is open source? You can look, and make it 
better. This is also true with Phobos though. When I call call a string 
function to std.string.split() how do I know how its beautiful inside? I 
can't it could be the worst splitting algorithm "random split." I would 
have to look at the code in the function, just like I would have to look 
at the code in a class.



More information about the Digitalmars-d mailing list