Skip to content

Remove Id's String cast - #94

Open
kevinresol wants to merge 1 commit into
masterfrom
kevinresol-patch-1
Open

Remove Id's String cast#94
kevinresol wants to merge 1 commit into
masterfrom
kevinresol-patch-1

Conversation

@kevinresol

Copy link
Copy Markdown
Member

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.

@back2dos

Copy link
Copy Markdown
Member

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

@kevinresol

Copy link
Copy Markdown
Member Author

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

@grepsuzette

grepsuzette commented Jul 27, 2020

Copy link
Copy Markdown

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

kevinresol added a commit that referenced this pull request Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants