Posted: Mon Jun 25, 2018 12:04 pm Post subject: RE:[WIP] Draft of Style Guidelines
I use m_ for class instance variables so in the example
var baz, floo : int
procedure bar (baz_, floo_ : int)
baz := baz_
floo := floo_
this would be
var m_baz, m_floo : int
procedure bar (baz, floo : int)
m_baz := baz
m_floo := floo
I think trailing underscores look messy - C# has leading underscores which look equally bad IMHO.
Additionally I think comments are very important. Most professional programmers don't like them and won't put them in: they say you have to maintain them and they just add to the burden of getting the job done. I agree a comment should not describe the code it is annotating but a comment is needed for explaining the business logic - if you need to explain your class or method or procedure or function or, indeed, whole program to someone else, you need to comment it, so that vocal explanation is not required.