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
I'm trying to deprecate some procs to use foo[T](arg) instead of foo(arg, T) syntax.
However deprecating foo(arg, T) gives deprecation warning even for foo[T](arg) syntax:
procfoo(size: int, T: typedesc): seq[T] {.deprecated.}=result=newSeq[T](size)
procfoo[T](size: int): seq[T]=result=newSeq[T](size)
let bar =foo[int](10) # Warning foo is deprecatedecho bar
The text was updated successfully, but these errors were encountered:
This is not related to the issue, but what problems did you have with the deprecated typedesc alternative? Overloading with typedesc is actually the better-supported and recommended API for mandatory type arguments.
Familiarity and consistency. I type someProc[T](foo) almost everywhere and I end up typing the same for all procs even if I shouldn't.
Muscle memory is hard to beat so embrace it.
I'm trying to deprecate some procs to use foo[T](arg) instead of foo(arg, T) syntax.
However deprecating foo(arg, T) gives deprecation warning even for foo[T](arg) syntax:
The text was updated successfully, but these errors were encountered: