3 ms·
> Javascript and Perl are different in that they allow a variable to change it’s type by reassignment That is orthogonal to the issue at hand. > Weak/strong t
by masklinn 5y ago
> Javascript and Perl are different in that they allow a variable to change it’s type by reassignment
That is orthogonal to the issue at hand.
> Weak/strong typing and dynamic/static typing are different axes.
And perl and javascript have both, and the weak typing is what gets criticised the most, and what causes the most issues.
- layer8 5y agoYes, the weak typing is what (rightfully) gets criticized, but the PL/1 design here is IMO closer to C with its implicit conversions but typed variables than to Perl and Javascript.
- masklinn 5y ago> the PL/1 design here is IMO closer to C with its implicit conversions but typed variables than to Perl and Javascript. So in your opinion, the PL/1 design here is closer to a trainwreck than an other trainwreck? Furthermore C's implicit conversions come nowhere near parsing a string to get a float, that's squarely on the Perl/JS side of the board.
- layer8 5y agoLook, I wasn’t expressing any value judgment, and I’m not advocating for implicit conversions. My point was that the implicit conversions in PL/1 have a different context in PL/1 than they have in Perl and Javascript, more akin to the one in C. One effect of that is that the type of a variable remains fixed in PL/1 where it doesn’t in Perl and Javascript. This places it at a different point in design space and changes the dynamics to some extent, which is just a nuance that I find interesting. It wasn’t expressed in the original comment I was replying to, so I thought it would be worth pointing it out so that he distinction isn’t being missed.