-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/packages
#5214Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listp: pigeonrelated to pigeon messaging codegen toolrelated to pigeon messaging codegen toolpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specificallyteam-ecosystemOwned by Ecosystem teamOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamTriaged by Ecosystem team
Description
The Objective-C generator uses NSNumber for all the types that the standard codec uses it for; this is the simplest approach, but in many cases it's not the most convenient for clients, or the most idiomatic:
- Non-nullable arguments that aren't in a collection.
- Non-nullable fields.
- Non-nullable return values.
The last is particularly weird; you basically never see a method in ObjC return an NSNumber representing a boolean, because nullable boolean returns are almost always a terrible concept, and most booleans that one works with in ObjC are BOOLs; you generally only box them if you need to put them in a collection.
This would add generator complexity, but having done something along these lines for the C++ generator (where the exact translation of a type depends on the context) it's not terrible.
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listp: pigeonrelated to pigeon messaging codegen toolrelated to pigeon messaging codegen toolpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specificallyteam-ecosystemOwned by Ecosystem teamOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamTriaged by Ecosystem team