[Gambas-user] variable declaration everywhere ???
Jussi Lahtinen
jussi.lahtinen at gmail.com
Wed Dec 12 00:11:56 CET 2018
Why would it be harder to debug?
David gave great example of it usage (pretty much only case where I use it)
and I think it only makes code more readable and less scope for the
variable.
Jussi
On Wed, Dec 12, 2018 at 12:48 AM Benoît Minisini <g4mba5 at gmail.com> wrote:
> Le 11/12/2018 à 23:26, David Sanromá a écrit :
> > Hello,
> >
> >
> > I don't mean to start a war ;) but there are cases where it makes
> > perfect sense to declare within code:
> >
> >
> > For I As Integer=1 To 10
> >
> > Next
> >
> >
> > Makes it very easy to move the code around to another function and/or
> > re-factor. You just worry abut the piece of code. You take the
> > declaration with you
> >
> >
> > Just an idea ;)
> >
> > David
> >
>
> As far as I am concern, the deal is between "code easier to write" and
> "code easier to debug", taking into account that the former is 20% of
> the development time, and the later 80%.
>
> --
> Benoît Minisini
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20181212/7fef2d60/attachment.html>
More information about the User
mailing list