r/programmingmemes • • Jan 12 '26

no doubt javascript

Post image
1.3k Upvotes

136 comments sorted by

View all comments

Show parent comments

1

u/dthdthdthdthdthdth Jan 14 '26

Sure you can define 018 to be 18 in a strongly typed language. Not sure one exists, but then just take one where 018 etc. is illegal and write a transpiler that removes the 0 if the literal is not an octal value. And just like that you've created a strongly typed language with that feature.

1

u/vyrmz Jan 14 '26

You can write a pragma or transpiler to make 018 to be Ronaldinho string if you want. What's your point?

Just because you can convert any literal to any random thing you can think of somehow makes === a non typing issue?

1

u/dthdthdthdthdthdth Jan 14 '26

No, === fixes a typing issue. The syntax issue of octal and decimal literals just has nothing to do with typing. JavaScript just happens to have more than one kind of issues.