[Gambas-user] variable declaration everywhere ???
chrisml at deganius.de
Fri Dec 14 00:02:47 CET 2018
Am 12.12.18 um 00:16 schrieb Benoît Minisini:
> Because as soon as variables can be declared anywhere, people will start
> to use that for writing ugly code. :-)
Exactly. I know it because I had a hard work with my own code which was
more than ten years old (VBA).
If we have to declare variables only at the beginning we tend to write
shorter methods which is much easier to understand. Especially if the
code is a couple of weeks/months/years old.
Since I program in Gambas my methods are smaller. Every time I see that
I had to declare many variables at the beginning I feel a kind of shame.
Because I know that the number of variables correlates with the
incomprehensibility of my own code.
Dies ist keine Signatur
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: OpenPGP digital signature
More information about the User