Hello guys

Hello guys,

In the next major release, you could remove the System.IEnumerable inheritance from the non-generic version System.IEnumerable? Without a rooted type system is a bit embarassing implement it. IEnumerable parameters are accepted in many places on RTL but it is not used by System.Generics.Collections where it would be hacky to use without any sort of disable warnings :(

:D

Comments

  1. Is there a QP for this? Please post it. I searched but couldn't find one, so maybe adding one would be a good idea.

    ReplyDelete
  2. Hello David Millington thanks for the tip :D Can you do it for me, please? :D I think your name is more expressive than mine for get this problem quickly solved :D Many thanks.

    ReplyDelete
  3. Horácio Filho "IEnumerable parameters are accepted in many places on RTL" o'rly? Wait, let's do a search... No they aren't. They are only accepted by 3 (THREE) methods in the entire RTL, two of them are in TList.

    ReplyDelete
  4. Stefan Glienke​ TStringHelper also uses it :D

    ReplyDelete
  5. Stefan Glienke hehehehehe, sorry :( It was too early ;)

    ReplyDelete
  6. Stefan Glienke Would be good if there is just one IEnumerable type definition, each one can have your own version of IEnumerable, it is bad :( And removing the inheritance doesn't break anything :D

    ReplyDelete
  7. Until they introduce interface/generics helpers (aka extension methods) I don't care if there is an IEnumerable in System.pas or not and use our own one anyway since it defines a whole bunch of methods.

    ReplyDelete
  8. Horácio Filho I can add one, sure, but feel free to add it yourself. I'll vote!

    ReplyDelete

Post a Comment