Re: 'Lets' organize our Delphi code



Rudy Velthuis [TeamB] wrote:
m. Th. wrote:

Do you think that you'll have problems understanding what is written
here:

for i: integer = 1 to 100 do
ShowMessage(IntToStr(i));

?

I think I have already said that, as single appearance, they are not a
problem. They become a problem if code gets interspersed with various
inline variable declarations in various spots.

For the same reason I don't like the inline definition of methods in
Java and C#(*), I don't like the inline declaration of variables in
these languages. I love to have my method declarations in the interface
section and the method definitions in the implementation section. In
the same way, I love my variables in the var section and the code using
them in the begin-end block.

(*) And what I thoroughly hate is having the private data members
somewhere at the bottom of the class declaration, but the code using
them near the top, which is possible in languages like Java, C# and
C++, AFAIK.


Yep, about this usage pattern we agree. :-)

--

m. th.
.



Relevant Pages

  • Re: Lets organize our Delphi code
    ... inline variable declarations in various spots. ... Java and C#, I don't like the inline declaration of variables in ... these languages. ... I love to have my method declarations in the interface ...
    (borland.public.delphi.non-technical)
  • Re: optimize, inline, oh my (questions)
    ... inline options. ... its sections on idiosyncracies, efficiency and type declarations. ... Code optimization techniques can also adversely impact on the develpment ... Once you have gotten to that point, then start adding type declarations ...
    (comp.lang.lisp)
  • Re: introspection in SML
    ... inline and notinline declarations, and compiler macros. ...
    (comp.lang.functional)
  • Re: introspection in SML
    ... inline and notinline declarations, and compiler macros. ...
    (comp.lang.functional)
  • Re: RFC: Type inference
    ... Depends on what you mean with "inline". ... var q:= from x in myType.GetInterfaces ... inline var declarations makes code easier to write and perhaps even ...
    (borland.public.delphi.non-technical)