What problems are there using generics and anonymous methods in Delphi 2009?
I'd like to start using generics and anonymous method, mainly to 开发者_JS百科learn what that's all about and why I would want to use them.
Having Delphi 2009, I often read that generics and anonymous methods are not completely implemented or buggy, which was fixed in Delphi 2010.
I would like to avoid having to wonder if it's my fault or a bug in Delphi 2009, every time something doesn't work as I expect.
My question is:
What exactly are the problems I will have when using generics and anonymous methods in Delphi 2009? What should I avoid?What problems will you have? Well, if everything compiles, then you're usually fine. It's not a bad codegen issue, more of a no codegen issue. It's that creating actual code from the generic templates tends to lead the compiler into dark corners and you get internal errors.
What should you avoid? At the risk of sounding snarky, what you should avoid is trying to use generics in D2009 and expecting them to work. Update 3 fixed a lot of things, but not everything. Delphi 2010 fixed a lot more, and generics are mostly usable now, unless you're trying to mix generics with packages. They're still working on getting that part right. At this point, I'd recommend just waiting a few more weeks (presumably) until the next version comes out and upgrade. With any luck they'll have generics working as solidly as the rest of the system.
You can use Quality Central. It lets you search on specific criteria (like version) and keywords to show you any problems that have been reported and their status. Remember that some of the closed items might have been fixed in a later release.
精彩评论