Replies: 2 comments 7 replies
-
What if we throw an error instead of Also conversion would be for conforming to table types so wouldn't need to decide which way to convert. I work with MSSQLServer a bunch for work and there it tries to convert but if an given query it runs into a single case where it can't comfortably convert it just throws like |
Beta Was this translation helpful? Give feedback.
-
Ok, let's divide the type conversion issue.
Because... currently we even don't support conversion between number types. (only conversion between literal ( There's no doubt that we need to properly support number type conversion. |
Beta Was this translation helpful? Give feedback.
-
Let's talk about type conversion in here.
started in #143 thread.
I think implicit conversion between number types are good, but not sure about between string and number types.
In the case of number types, most of cases we can safely convert types without panic.
(usually we may use conversion to float types like
f64
)However, string types are different.
Implicit conversion between string and number can cause some problems when string values cannot be parsed so we need to use something like
NaN
.Also in some cases, it would be a bit hard to decide convert whether from string to number or from number to string.
I'm not sure that specifying a straightforward policy of implicit conversion between number and string is really possible.
We all know an example of... javascript, about why we don't use
==
and!=
anymore.Beta Was this translation helpful? Give feedback.
All reactions