Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2010-05

Generic enumerators

4 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Anthony Walter
to Honza

Is the keyword "generic" really needed here:

type generic TEnumerator<TValue, TIterator> = class

- should be -

type TEnumerator<TValue, TIterator> = class

It looks completely unnecessary and I've never seen a situation in pascal where anything but an identifier follows the keyword type. Whomever came up with the idea was probably more interested in making the feature easy to implement in the compiler rather than more natural for pascal programmers.

Reply by email

Florian Klaempfl
to Anthony Walter
Is the keyword "generic" really needed here:

Yes, I explained it multiple times to you alreay.

Show quoted text 12 lines
type generic TEnumerator<TValue, TIterator> = class - should be - type TEnumerator<TValue, TIterator> = class It looks completely unnecessary and I've never seen a situation in pascal where anything but an identifier follows the keyword type. Whomever came up with the idea was probably more interested in making the feature easy to implement in the compiler rather than more natural for pascal programmers.

Compared to you, the person who did it, did at least anything. You did nothing so far.

Reply by email

Henry Vermaak
to Anthony Walter: Is the keyword "generic" really needed here: type generic TEnumerator<TValue, TIterator>…
Anthony Walter wrote 12 lines
Is the keyword "generic" really needed here: type generic TEnumerator<TValue, TIterator> = class - should be - type TEnumerator<TValue, TIterator> = class It looks completely unnecessary and I've never seen a situation in pascal where anything but an identifier follows the keyword type. Whomever came up with the idea was probably more interested in making the feature easy to implement in the compiler rather than more natural for pascal programmers.

I believe you have raised this already? I'm sure the fpc team will welcome your patches.

Henry

Reply by email