[Gambas-user] variable declaration everywhere ???

Christof Thalhofer 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.

Alles Gute

Christof Thalhofer

-- 
Dies ist keine Signatur

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20181214/9f1d6819/attachment.sig>


More information about the User mailing list