Atomorun2008 Opensource

Matthias Thurau Matthiasth at gmx.de
Fri Aug 22 04:10:05 PDT 2008


Mike Parker Wrote:

> bearophile wrote:
> > Jarrett Billingsley:
> >> Uh, I'm not sure where you got the idea that you can tell other people what 
> >> coding style they should use, but typically it doesn't work ;)
> > 
> > I'd love people to criticize my code :-)
> > 
> > In the the creative literary mailing lists I follow I am used (and even supposed too) to comment/criticize everything people shows in the group. So I am trying to... improve this group encouraging people to look at each other code to suggest things, etc. A community of writers doesn't need to be too much different from a group of programmers :-)
> > The things I have said here aren't just "coding style", for example I have avoided suggesting things like where to put the brackets, how much indent use, etc. The things I have suggested, like to not put "private" inside structs seems more important, closer to being code bugs (despite not being bugs). Walter has written some conventions for D and I think it's positive to follow some of them (even if maybe Tango doesn't follow some of them).
> > 
> 
> In literature, the written word is the end product, which should be as 
> 'polished' as possible. Software is polished in terms of functionality 
> and presentation. Which features of the language to use in the source 
> itself ('with' statements, templates, and so on) is a choice of personal 
> discretion (or team coding standards). Your suggestions are nowhere near 
> the equivalent of helping someone improve a literary work.
> 
> If your post of unsolicited suggestions had been directed at me, I'd 
> ignore the whole thing and be rather annoyed at you for doing so. Just 
> because you don't need to add 'public' to struct fields doesn't mean you 
> shouldn't. Some, myself included, would argue that it improves 
> readability. Just because Point objects share a lot of similar code 
> doesn't mean they *have* to be implemented as templates (as suggested by 
> downs). Personally, I avoid templates for such simple cases. You say 
> this isn't the same as telling someone where to put the brackets, but in 
> effect it is because there's no 'right' way.
> 
> Sure, source should be readable so that others can pick it up. But an 
> important aspect of readability is consistency. Whether or not you use 
> 'with' statements is less important that whether you do so or don't do 
> so consistently.


I agree with you. I was not very interested in the fact that i dont have to put a ; at the end of a struct or function or whatever :) Sometimes you need it and sometimes you dont need it. But if you put it there and don t need it, it is most times not wrong. So i prefer to put it always there.

Maybe it is, or maybe not: But i think on an Announcement forum, there shouldn t really be a discussion about coding style. In general its good to help people with style and so on. I am willing to learn, too. But i think this is the wrong place for it!


More information about the Digitalmars-d-announce mailing list