You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getInt(name:) and getBool(name:) etc could use overloads instead of unique names to distinguish the types. This impacts usage at the call site in the following ways:
When called nakedly, a type annotation may need used to disambiguate the method.
When the type is able to be inferred, the call site avoids adding redundant type information.
In addition to overloading "get" methods, it seems intuitive to access these via subscript. Below is a little playground snippet exploring this idea and showing some call site usage side by side.
The text was updated successfully, but these errors were encountered:
ianterrell
changed the title
Consider overloading the Flags subscript instead of providing types in names
Consider overloading the Flags subscript instead of including types in method names
Feb 3, 2017
getInt(name:)
andgetBool(name:)
etc could use overloads instead of unique names to distinguish the types. This impacts usage at the call site in the following ways:In addition to overloading "
get
" methods, it seems intuitive to access these via subscript. Below is a little playground snippet exploring this idea and showing some call site usage side by side.Awesome library BTW. :)
The text was updated successfully, but these errors were encountered: