4 ms·
If I'm understanding you right, "C-like-syntax" languages generally allow this: function big() { let x,y,z; { // Fir
by dasmoth 8y ago
If I'm understanding you right, "C-like-syntax" languages generally allow this:
function big() {
let x,y,z;
{
// First bit
let localToThisSection = 42;
...
}
{
// Second bit
...
}
}
- joe_the_user 8y agoYes, If your x,y, and z are both inputs and outputs, that works. If you wanted a syntax that exactly mirrored what happens in the gp's second example, you'd need more work. Plus if you force a begin-bracket to have a label, you avoid the editor having to use "fun3756" when automatically abstracting out the subroutine.