请问编程风格? [英] Ask the programming style ?

查看:73
本文介绍了请问编程风格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解全世界所有优秀程序员的编程风格.
Microsoft C ++程序员,Linux程序员,公司和许多优秀的学生,各地的教授以及任何认为自己是优秀程序员的人.

简而言之,我只想有一个条件.

示例:

I want to know the programming style of all good programmers all over the world.
Programmer in Microsoft C++, Programmer in Linux, companies and many good students, professors everywhere and anybody who thinks she/he is a good programmer.

In brief, I only want to have one criterion.

Example:

__STD::swap(_M_start, __x._M_start);
__STD::swap(_M_finish, __x._M_finish);
__STD::swap(_M_end_of_storage, __x._M_end_of_storage);



我不喜欢_和__,它们的含义是什么.



I don''t like _ and __ and what do they mean.

推荐答案

可能是您不喜欢我的答案,但是...没有答案对于这样的问题.

编程风格有些个人化.在公司,社区等中可能会使用一些准则.但是-就我的经验(30年编程)而言-他们的程序员总是或多或少地违反它们.

我唯一能给出的建议是找到适合您的风格,让您感到舒适,更重要的是与之保持一致.不要在文件,项目等中进行更改.

认真的公司和程序员会在使用您的资源时理解它并加以遵循.
May be you''ll not like my answer but ... there is no answer for such a question.

Programming style is somewhat personal. There can be guidelines in use in companies, communities etc. but -as far my experience is(30 yers of programming)- they are always more or less violated by their own programmers.

The only recommendation I can give is to find yourself a style that lets you comfortable and -more important- be coherent with it. Don''t change it halfway in a file, project etc.

Serious companies and programmers will understand it and follow it when using your sources.


Emilio给了您很好的答案.

我可以建议的一件事是遵循所使用语言的标准库样式.例如,对于C或C ++,这将是 K& R样式 [^ ](是的,有很多下划线:)).
Emilio gave you a good answer.

One thing I can recommend is to follow the style of the standard library for the language you are using. For instance, with C or C++ that would be the K&R style[^] (yes, lots of underscores :) ).


我知道:一个问题有很多答案,就像编程中的许多样式一样.

当我阅读他们的代码时,我并不容易,因为我不知道他们的样式代码.如果他们共享代码,我认为他们应该共享编程风格.

样式很多,但我希望它们遵循准则.遵循指南,我不在乎,但我想知道它们何时共享代码.

我想如果我知道规则,我会做得更好.

我总是在等待新的答案.谢谢大家.
I know that : There are many answers for one question like many styles in programming.

I am not easy when i read their code, because i don''t know their style code. If they share code i think they should share programming style.

Many styles, but i want they are followed guidelines. Guidelines followed them, i don''t care but i want to know when they share code.

I think if i know the rules, i will work better.

I always wait new answers. Thank all you.


这篇关于请问编程风格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆