Re: Deriving from templates
From: Victor Bazarov (v.Abazarov_at_comAcast.net)
Date: 01/12/05
- Next message: Victor Bazarov: "Re: specializing std::less"
- Previous message: Victor Bazarov: "Re: Reading memory-adresses from files"
- In reply to: Julie: "Re: Deriving from templates"
- Next in thread: Julie: "Re: Deriving from templates"
- Reply: Julie: "Re: Deriving from templates"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 11 Jan 2005 21:11:15 -0500
"Julie" <jj@networld.com> wrote...
> Victor Bazarov wrote:
>> Julie wrote:
>>
>>> [...]
>>> I'd hardly call the STL portions a model of how to do things. No
>>> offense to PJP, et al., but I consider the STL a _horrible_ mess of
>>> virtually unreadable code.
>>
>>
>> I am fairly certain it's perfectly readable to those who wrote it.
>
> Probably. And for the rest of us?
The Standard headers [even if they exist in a text file form] are not
intended to be read by us[ers]. All we need to know about them is
perfectly readably expressed in the Standard.
>> It is possible that they use an automated obfuscator before shipping
>> the final result, of course.
>
> Yes, possible, but if the case, of very detrimental value.
Why? The reason to "obfuscate" it is to protect from possible name
conflicts. Many variables there have the form _X (where 'X' is any
capital letter). Anything that is intended for access (like typedefs
and class/function names) is perfectly readable. Multiple statements
on a single source line is a necessity to keep the processing speed
to a maximum and space to a minimum.
> Forget the code, of all the STL documentation that I've seen, it is based
> on that (deliberately or consequentially) obfuscated code. Personally, I
> rate STL documentation as the worst there is, but I digress...
I suppose the documentation you write is perfect, yes?
>> Besides, Mike didn't suggest to use Dinkumware's version _specifically_
>> but "an STL implementation that you like". If you don't like any [you
>> have seen], it doesn't mean they all are bad.
>
> I'll readily admit that I'm far from an STL expert and have limited
> exposure to : Borland's version (from the early days), whatever has
> shipped w/ MS VisualC++ (Dinkumware included), and SGI. None of those
> qualify as readable to me.
Again, they are not intended to be readable [by you].
Get a copy of STLport, you actually may change your mind. And take a look
at other implementations, like GNU's.
> If you have any recommendations to _any_ implementation that is written w/
> /clarity/ in mind, please let me know, same applies to documentation.
No, I don't know of any, really. The Dinkumware source is fine with me,
especially since it works if I need to step through it (though very
rarily indeed).
> If anyone cares, and I doubt that anyone does, those are the *main*
> reasons that I don't spend a lot of time w/ STL. I didn't grow up on
> Unix, and personally, shun that style and level of obfuscation.
I don't think the two have anything to do with each other.
V
- Next message: Victor Bazarov: "Re: specializing std::less"
- Previous message: Victor Bazarov: "Re: Reading memory-adresses from files"
- In reply to: Julie: "Re: Deriving from templates"
- Next in thread: Julie: "Re: Deriving from templates"
- Reply: Julie: "Re: Deriving from templates"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|