[Gambas-user] variable declaration everywhere ???
Fabien Bodard
gambas.fr at gmail.com
Thu Dec 13 23:32:06 CET 2018
Public Sub main()
For i As Integer = 0 To 100
Print i
Next
For Each hClass As Class In Classes
Print hClass.Name
Next
End
this not look so bad... just miss the autocompletion then..
Le jeu. 13 déc. 2018 à 09:59, Fabien Bodard <gambas.fr at gmail.com> a écrit :
>
> For some long piece of code having to memorize the long list of
> declared variable sometime is more harder than reading a var just
> declared above. And yes ... only for things like loop or var swaping.
>
>
> But like many things is it matter of language limitation or convention
> ? What is the better ... limiting using by constaint or by convention
> ?
>
> Limiting by constraint can make us lose some users (It's the same for
> namespace).
> Maybe for some case allowing to not use explicit declaration can be
> interesting... like for script for exemple.
> In this case we can imagine that default can be variant. But this must
> be an option in header (NOEXPLICIT).
> WIth that gbs can automatiquely add this option in background.
--
Fabien Bodard
More information about the User
mailing list