tink_sql icon indicating copy to clipboard operation
tink_sql copied to clipboard

Remove Id's String cast

Open kevinresol opened this issue 5 years ago • 3 comments

This is mostly a trouble maker rather than a convenient function.

  1. it subverts the type system (string is silently accepted without notice, mostly happen in refactors)
  2. it crashes if the parsing is invalid

over the past few years I only get crashes from it but never really get any benefits.

kevinresol avatar Mar 12 '20 03:03 kevinresol

I think it might be there for allowing id in a query string and such.

back2dos avatar Mar 12 '20 08:03 back2dos

I think in any case it should be explicitly parsed into int (so that exceptions can be handled) before passing to tink_sql.

kevinresol avatar Mar 12 '20 09:03 kevinresol

Perhaps we could have a @:deprecated on this cast from stringly to get more visibility how often it is used.

grepsuzette avatar Jul 27 '20 09:07 grepsuzette