Basic coding style
bearophile
bearophileHUGS at lycos.com
Mon Nov 22 10:03:25 PST 2010
Dmitry Olshansky:
> Usually I'd always check the docs before using functions/classes, and not because of name alone.
Right, but a standard naming scheme allows you to tell apart different kinds of things just from the look of their, this helps you speed up your coding a little, etc, and makes the visual look of the code less noisy, because it decreases unecessary randomness inside the listings. This is why when you have a little training in using Pascal-like languages you write all names in the same case and style, because otherwise you add unnecessary noise.
> In the end if you dislike theirs naming scheme so much, just make aliases/wrappers,
The point of the discussion is not what I like. I don't even like the standard D naming conventions.
> They may just as well adopt a classic C-like interface (like zlib for instance) and
> what if you dislike it and like classes/generics/ranges ?
> Shoot them all, huh?
I think this is beside the point.
------------------------
Kagamin:
> If your standard loses then it's a bad standard and it *should* lose. And earlier is better than later.
Right :-) Yet there are advantages of having one standard. Sometimes even a suboptimal standard is better than no standard :-)
------------------------
Mike Parker:
> People are absolutely free to write D code in any style they please.
I don't agree, and I think this is bad and will lead to a mess. This doesn't lead to a good ecosystem of D modules that you may find online and integrate in your code.
> I certainly don't want anyone
> dictating style to me on any projects I might make publicly available.
If you write Python or C# code that other people are supposed to use, then people will surely tell you that your coding style is bad, if you don't follow their basic coding styles.
------------------------
Yao G.
> And I think bearophile should stop being rude with people at the D.learn newsgroup.
I am not sorry for the things I have said about this topic in various threads.
------------------------
It seems most people here don't see the risk I am talking about. Maybe most people here are used to C/C++ languages that don't have a basic coding style, and they think they have a God-given right to do the same in D and help create a messy ecosystem of modules for D too. So I will keep my muzzle shut. It's a lost opportunity to create a better ecosystem.
Bye,
bearophile
More information about the Digitalmars-d
mailing list