Redian新闻
>
大家programming时怎么命名?
avatar
大家programming时怎么命名?# Programming - 葵花宝典
z*h
1
现在做的工作需要从sample language sentence induct grammar
language可能是很简单的
请问有什么这方面的现成的tool吗?(实验阶段的也可以,不一定要industry grade的)
先谢了!
avatar
A*g
2
【 以下文字转载自 Linux 讨论区 】
发信人: Ang (拖拉A梦), 信区: Linux
标 题: 大家programming时怎么命名?
发信站: BBS 未名空间站 (Tue Jun 24 18:50:19 2008), 转信
怎样命名variable, function, class, filename ...
avatar
t*k
3
search "grammar induction" or "grammar inference"
A lot has been done on regular grammar induction.
avatar
c*r
4
float fCurrentPosZMotor = 0.0f;
avatar
t*e
5
Hungarian notation is not considered a good practice now.
Better use
float currentZPositionOfMotor = 0.0;

【在 c***r 的大作中提到】
: float fCurrentPosZMotor = 0.0f;
avatar
r*r
7
i still like the traditional C way of naming: using underscore, like cur_z.
some of the java code has insanely long variable name, like
hasNoSpecialMeaningSadVariable . lol
avatar
d*8
8
variable:类型小写在前,like: strProductName
function: 动词小写在前,like: getProductName
class:名次大写,like: ProductObject
filename: 差不多和class 一样吧。
avatar
f*y
9
每个语言,甚至每个公司和project都不一样的convention的

【在 A*g 的大作中提到】
: 【 以下文字转载自 Linux 讨论区 】
: 发信人: Ang (拖拉A梦), 信区: Linux
: 标 题: 大家programming时怎么命名?
: 发信站: BBS 未名空间站 (Tue Jun 24 18:50:19 2008), 转信
: 怎样命名variable, function, class, filename ...

avatar
g*g
10
It's all about consistency, so far, I'd say Sun did a good job on
java convention. C++ style can be very different. Java, you can almost
figure out how well one's trained by looking at the namings.

【在 f*******y 的大作中提到】
: 每个语言,甚至每个公司和project都不一样的convention的
avatar
f*y
11
java这个rule是sun的官方版本吧

【在 g*****g 的大作中提到】
: It's all about consistency, so far, I'd say Sun did a good job on
: java convention. C++ style can be very different. Java, you can almost
: figure out how well one's trained by looking at the namings.

avatar
f*Q
12
为什么涅?

【在 t****e 的大作中提到】
: Hungarian notation is not considered a good practice now.
: Better use
: float currentZPositionOfMotor = 0.0;

avatar
f*Q
13
俺记着OS X里面都用NS开头表示NeXTSTEP。
Mozilla也用NS开头表示Netscape。
avatar
t*e
14
As an example, suppose later you decide to change the variable type from "fl
oat" to "double," then you'll have to change the variable name in every loc
ation, otherwise it will give false information.

【在 f*****Q 的大作中提到】
: 为什么涅?
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。