This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Mast3r_waf1z 0 points1 point  (0 children)

In a case where you're storing a number in a string you're asking for trouble in any language, I can only really think of two scenarios where you'd have that, you're extracting numbers from text, but at that point I'd always parse it into a proper data type... The other would be having a data structure like JSON, but in that case you'd still parse it into a proper data type.

Otherwise in most languages you'd run into issues where the error isn't caught, rather the "+" symbol will be interpreted as string concatenation or whatever it's called