A
A
Ann As2016-01-18 00:26:46
Programming
Ann As, 2016-01-18 00:26:46

What are the notations (naming rules) in programming?

I met two types of notation:
- camelCase;
- under_score.
Based on the above I saw combinations of styles .
Pros and cons , as I understand it - this is a purely personal matter (individual, company). What are you using? I will use the corrected style tomorrow, based on the source .
I've been learning programming for a couple of months. Now in Java I use the following conventions:
1. variable int iValue = 0;(I put the first symbol of the type in the prefix);
2. instance variable int m_iValue = 0;(met in S.Prata 's book )
3. function/method: camelCase;
4. Grades: CamelCase;
5. objects: obj_jlabName = new JLabel();(something similar in the book atG. Schildt about Swing ).
Conclusion #1: Self-documenting code. Source - post and comments on this question.
Conclusion #2: Reading books like Perfect Code , Clean Code .

Answer the question

In order to leave comments, you need to log in

6 answer(s)
A
Armenian Radio, 2016-01-18
@snave

I don't see the point in modern IDEs with syntax highlighting, putting information about the type and class membership in the variable name.
-less gibberish
-more readability and self-commenting code

D
Dimonchik, 2016-01-18
@dimonchik2013

https://www.youtube.com/watch?v=z5WkDQVeYU4

X
xmoonlight, 2016-01-18
@xmoonlight

Briefly: Name so that the meaning of the variables (code) is clear not only to you.

R
romy4, 2016-01-18
@romy4

points 1,2 and 5 are horror and the last century.

O
Oleg Tsilyurik, 2016-01-18
@Olej

I've been learning programming for a couple of months.

I propose, for greater fruitfulness of the indicated discussion, to return to it ... in 10 years. ;-)
PS In the meantime, you study programming ...

A
abs0lut, 2016-01-18
@abs0lut

Now in Java

Java has its own naming convention, like most languages. This is not a place for creativity or display of individuality.
perversion
perversion
the first time I've heard
perversion

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question