[Gambas-user] variable declaration everywhere ???
Charlie Ogier
charlie at cogier.com
Fri Dec 14 14:24:52 CET 2018
Hi All,
To satisfy everybody why not have 'Option Explicit'. Personally I think
it should stay as it is, I see danger in this.
Charlie
On 14/12/2018 12:04, Bruce wrote:
> Well, lets just get out of the box here (or outside the nine dots, if
> you get my idea)
>
> On 12/12/18 9:59 am, Jussi Lahtinen wrote:
>> Aesthetics or practical issue?
>
> (BTW, I just picked this as a rational point in the thread.)
>
> The only cogent argument that has been presented by the entire brains
> trust here is that it would be handy, really handy, to be able to
> "declare indexers for an array loop on the fly".
>
> So, here's a couple of (possibly stupid) ideas.
>
> 1) For Each <array>
> do something
> Next
> ' No indexer, no garbage, the implied indexer would only have scope
> inside the loop.
>
> 2) Less personally favored but possibly useful:
> For idx as Integer = -Infinity To Infinity ' or some other bounds
> that are meaningful.
> <array>[idx] 'do something
> Next
> ' idx survives, but only until it is next proposed as an indexer
>
> I mean, just because "some other language" proffers the opportunity to
> create gibberish code, it doesn't mean that Gambas has to. In fact,
> further, why not create something new and useful?
>
> Anyway, just my thoughts. (Thanks Rolf! You crystalised what I was
> trying to think about.)
>
> best regards
> Bruce
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
More information about the User
mailing list