Talk:Variable declaration reset: Difference between revisions

Content added Content deleted
Line 26: Line 26:


::The task arose because apparently identical (transpiled) code worked quite differently in different languages, specifically Phix (does not) and JavaScript (does for let, does not for var). The task, and the whole purpose of this site, is to highlight (subtle) differences between languages. It has certainly taught me (the author of the task) quite a few and sometimes rather surprising things. What the actual task itself does is deliberately trivial and pointless. So far I've got (cmiiw):<br>
::The task arose because apparently identical (transpiled) code worked quite differently in different languages, specifically Phix (does not) and JavaScript (does for let, does not for var). The task, and the whole purpose of this site, is to highlight (subtle) differences between languages. It has certainly taught me (the author of the task) quite a few and sometimes rather surprising things. What the actual task itself does is deliberately trivial and pointless. So far I've got (cmiiw):<br>
:::Does reset: Algol, C++, F#, Factor, Go, Java, Julia, [Python], Vlang, Wren.<br>
:::Does reset: Algol, C++, F#, Factor, Go, Java, Julia, Python[moreso than not], Vlang, Wren.<br>
:::Does not: AWK, C (C99), FreeBasic, Phix, PL/M, Red, VisualBasic.NET.<br>
:::Does not: AWK, C (C99), FreeBasic, Phix, PL/M, Red, VisualBasic.NET.<br>
:::Both: JavaScript, Raku. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 12:49, 21 June 2022 (UTC)
:::Both: JavaScript, Raku. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 12:49, 21 June 2022 (UTC)