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
nim has a syntax to indicate deprecated symbols and also generate automated code upgrade using nimfix:
eg, for a type:
{.deprecated: [TSocketHandle: SocketHandle].} # see https://nim-lang.org/docs/manual.html#pragmas-deprecated-pragma
likewise for procs.
Could that syntax be extended to proc parameters?
that way, ill-named parameters can be renamed with minimal impact.
The alternative we've been using (IIRC) is to not consider param name changes as breaking changes, according to #8306 (comment) :
The argument about making it easier to deprecate/add named parameters is really important IMO. It's currently unclear when it's "safe" to use named parameters when calling third-party code, since renaming a parameter is typically not treated as a breaking change
but the fact of the matter is whenever code calls the proc with keyword instead of positional, code will break.
With this suggestion, code will not break, but generate a warning, and can be automatically ugpraded via nimfix.
The text was updated successfully, but these errors were encountered:
timotheecour
changed the title
{.deprecated. [oldName: newName]} pragma for parameter names
[WONTFIX] {.deprecated. [oldName: newName]} pragma for parameter names
Feb 13, 2019
nim has a syntax to indicate deprecated symbols and also generate automated code upgrade using
nimfix
:eg, for a type:
likewise for procs.
Could that syntax be extended to proc parameters?
that way, ill-named parameters can be renamed with minimal impact.
The alternative we've been using (IIRC) is to not consider param name changes as breaking changes, according to #8306 (comment) :
but the fact of the matter is whenever code calls the proc with keyword instead of positional, code will break.
With this suggestion, code will not break, but generate a warning, and can be automatically ugpraded via nimfix.
The text was updated successfully, but these errors were encountered: