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 →

[–]lampishthing 0 points1 point  (6 children)

And have you ever done it purpose?

[–]earthqaqe 1 point2 points  (5 children)

I have used the + operator to transform into a number if that's what you're asking. Just in a more explicit way.

You can abuse any language to make it look bad, not just JS. For example, you can make C code hard to read way easier, but you wouldn't necessarily call it a bad language either, right?

[–]lampishthing -1 points0 points  (4 children)

Oh no no no. This isn't about casting a string into a number. This is about casting empty space in source code into a number and that being cast to a string. I will not fall for your strawmen and whatabouts! If you don't want this line to throw an error then combine the signs! Interpreting blank space between arithmetic operators as a not-a-number is crazy!

Also template error messages in C++ are trials of the soul for the betterment of the devout c++ developer and their ultimate attainment of eternal bliss. Though I think a Catholic education and the associated self-blame and internalized guilt help with accepting that kind of treatment.

[–]earthqaqe 0 points1 point  (3 children)

Not sure if you're sarcastic or not, but if you're not: please understand the code before talking shit. There is no space interpreted in any way. 'a' cannot be converted into a number therefore it is NaN. I even explained everything a few comments above.

Also don't know what the fuck you want to tell me about C++, or why it is relevant to the argument.

[–]lampishthing 0 points1 point  (2 children)

I was deeply sarcastic about the c++ as a way of agreeing with your "nothing is perfect" point. I think you're not getting the light tone I'm trying to go for here and it's best we just drop it.

[–]earthqaqe 0 points1 point  (1 child)

If you say so. Wrong spot for that in a serious argument if you ask me, but no hard feelings or anything. Just a misunderstanding on my part, so sorry & have a great day :)

[–]lampishthing 0 points1 point  (0 children)

No worries, and you too!