Wednesday, June 10, 2015

Re: Generics!


On Jun 10, 2015, at 3:27 AM, Greg Parker <gparker@apple.com> wrote:

That's right. It may be possible to ratchet up the type checking someday, but at this point trying to type check too strongly is counter-productive in the presence of incomplete adoption.

Yeah, if it did strict checking, then I'd have to paramaterize every single occurrence of 'NSArray' and 'NSDictionary' in my entire 40,000-LOC project, which would take quite a while. [Although I guess the checking could be enabled by a compiler flag on a file-by-file basis.]

I wonder if this is something that could be done by a refactoring tool? (I was v. impressed at how the Swift2 converter can actually rewrite code that used manual error checking to use exceptions!)

—Jens

No comments:

Post a Comment