RE: SV: Regarding coding style

2008-03-08 Thread Ryan Ginstrom
> On Behalf Of Grant Edwards > I think docstrings are a great idea. What's needed is a way > to document the signature that can't get out-of-sync with > what the fucntion really expects. Like doctests? (I know, smart-ass response) Regards, Ryan Ginstrom -- http://mail.python.org/mailman/list

Re: SV: Regarding coding style

2008-03-08 Thread Grant Edwards
On 2008-03-09, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Sat, 08 Mar 2008 21:21:48 +0100, K Viltersten wrote: > >> Coming from C++/Java camp i can't help noticing that in most cases, when >> i'm using a class written by somebody else, i don't want to see his/her >> code. I only want to know W

Re: SV: Regarding coding style

2008-03-08 Thread Grant Edwards
On 2008-03-09, K Viltersten <[EMAIL PROTECTED]> wrote: >>> /** Projects an object from 3D to 2D using >>> the method of Alexander The Great. >>> \param 3D structure to be projected >>> \returns 2D projection >>> */ >>> public Proj2D get2Dfrom3D(Proj3D param); >>> >>> The above is, to me

Re: SV: SV: Regarding coding style

2008-03-08 Thread Grant Edwards
On 2008-03-08, K Viltersten <[EMAIL PROTECTED]> wrote: >> If you can't/don't look at the source file, >> then comments aren't going to help (except >> in the case of something like docstrings in >> Python). > > I strongly disagree. Now, perhaps we're > talking about different things, here? > Us

SV: Regarding coding style

2008-03-08 Thread K Viltersten
>> /** Projects an object from 3D to 2D using >> the method of Alexander The Great. >> \param 3D structure to be projected >> \returns 2D projection >> */ >> public Proj2D get2Dfrom3D(Proj3D param); >> >> The above is, to me, very clear and >> consistent. Not to mention, easily >> handl

SV: SV: SV: Regarding coding style

2008-03-08 Thread K Viltersten
>>> If you can't/don't look at the source file, >>> then comments aren't going to help (except >>> in the case of something like docstrings in >>> Python). >> >> I strongly disagree. Now, perhaps we're >> talking about different things, here? >> Usually, in the header file (C++), there >> won't

Re: SV: Regarding coding style

2008-03-08 Thread Steven D'Aprano
On Sat, 08 Mar 2008 21:21:48 +0100, K Viltersten wrote: > Coming from C++/Java camp i can't help noticing that in most cases, when > i'm using a class written by somebody else, i don't want to see his/her > code. I only want to know WHAT the function does (is intended to be > doing, at least). >

Re: SV: SV: Regarding coding style

2008-03-08 Thread Ben C
On 2008-03-08, K Viltersten <[EMAIL PROTECTED]> wrote: >> If you can't/don't look at the source file, >> then comments aren't going to help (except >> in the case of something like docstrings in >> Python). > > I strongly disagree. Now, perhaps we're > talking about different things, here? > Us

SV: SV: Regarding coding style

2008-03-08 Thread K Viltersten
> If you can't/don't look at the source file, > then comments aren't going to help (except > in the case of something like docstrings in > Python). I strongly disagree. Now, perhaps we're talking about different things, here? Usually, in the header file (C++), there won't be any source code, e

Re: SV: Regarding coding style

2008-03-08 Thread Grant Edwards
On 2008-03-08, K Viltersten <[EMAIL PROTECTED]> wrote: >> What I really can't stand are the pointy-haired comment blocks >> at the beginnings of C/C++ functions that do things like tell >> you the name and return type of the function and list the >> names and types of the parameters. Gee, thanks.

SV: Regarding coding style

2008-03-08 Thread K Viltersten
> What I really can't stand are the > pointy-haired comment blocks at the > beginnings of C/C++ functions that do > things like tell you the name and return > type of the function and list the names > and types of the parameters. Gee, thanks. > I never could have figured that out from > looki

Re: SV: Regarding coding style

2008-03-07 Thread Grant Edwards
On 2008-03-07, K Viltersten <[EMAIL PROTECTED]> wrote: >>> Personally, I dislike double spaces after sentences, but it is >>> not wrong to put them there any more than it is wrong not to >>> put them there. >> >> You're lucky my high school typing teacher didn't hear you say >> that... > > I'm un

SV: Regarding coding style

2008-03-07 Thread K Viltersten
>> Personally, I dislike double spaces after >> sentences, but it is not wrong to put them >> there any more than it is wrong not to put >> them there. > > You're lucky my high school typing teacher > didn't hear you say that... I'm unclear if your teacher was a double or single spacer. It's

SV: Regarding coding style

2008-03-07 Thread K Viltersten
>> 2. You should use two spaces after a >> sentence-ending period. >> >> For heavens sake, why? I've always been >> obstructed by the double blanks but >> tolerated them. Now, that i read that >> it actually is a recommendation, i need >> to ask about the purpose. > > (a) It makes the ends of