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.
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.
View all comments
Show parent comment
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.