[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnustep-base collection classes now support generics
From: |
Niels Grewe |
Subject: |
Re: gnustep-base collection classes now support generics |
Date: |
Tue, 23 Feb 2016 18:24:38 +0000 |
> Am 23.02.2016 um 10:14 schrieb David Chisnall <address@hidden>:
>
> Have you also looked at adding instancetype to the various places that expect
> it and at the nullability attributes? The latter is primarily intended for
> Swift interop, but does make the static analyser results more useful (and can
> generate better code in a few places, though not by much).
I have added backwards-compatibility definitions of instancetype (defined to id
if unsupported by the compiler) and updated the collection classes I was going
over anyways. This promptly caught two (albeit harmless) cases in base where an
immutable object was assigned to a variable typed for the mutable subclass.
Regarding nullability annotations, I've already added the macros for non-null
audited sections, but I'm still a bit unsure about how to handle/define the
nullability qualifiers, especially since there are now three variants of them
(the double-underscore ones, the underscore-and-capitalised ones, and the
contextual variants without underscores in method parameters). So yeah, it’s on
my list.
Cheers,
Niels