Paul Ishenin pisze:
Dariusz Mazur wrote:
Where?
Its work now with current compilator. Are You plan to disable this?
I made a typo: read 'I see *no* problems with this'.
for i in List using GetEnumerator(DoUpArgument)
current "for i in List" will be just short form of "for i in List
using GetEnumerator"
But this complicate both: source and compilator.
Why compilcate? I thought vice versa it will simplify the user source
code.
Can You give example of this:
where
for i in List using GetEnumerator
is better than
for i in List.GetEnumerator
And second: You cant pass enumerator as param.
Maybe you understood me wrong? I proposed the 'using' keyword as an
extension to the current implementation. It would not be required. If
not used then it will work as now but if used then compiler will
search for the given identifier and use it instead of
operator/GetEnumerator method.
this is third method,
Should be good point to implement this (pascal always has very simple
semantic and very strong type checking)
Of course you then you can use any enumerator with any collection, but
it will be better?
How many errors we then invoke?
--
Darek
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal