Discuss Scratch
- Discussion Forums
- » Suggestions
- » So-called "L" blocks: snap-on else & else if
- DaEpikDude
- Scratcher
1000+ posts
So-called "L" blocks: snap-on else & else if
I had a random thought.
We're all familiar with the blocks if and if…else, right?
And we presumably know that you can put an if inside of else to make an else if.
I had a random idea where below the “if” c block, you have an “else if” ‘L’ block and an “else” ‘L’ block.
They snap onto exclusively the “if” block, and sort of extend it, so if you have 10 else ifs, it isn't horribly indented by the end.
Basic idea…
The idea is that you attach the else and else if onto the if, and it makes it one big block all on the same line, instead of it gradually becoming further and further right the more else ifs you add.
Sorry if I didn't explain this very well, it's just a random idea that popped into my head.
We're all familiar with the blocks if and if…else, right?
And we presumably know that you can put an if inside of else to make an else if.
I had a random idea where below the “if” c block, you have an “else if” ‘L’ block and an “else” ‘L’ block.
They snap onto exclusively the “if” block, and sort of extend it, so if you have 10 else ifs, it isn't horribly indented by the end.
Basic idea…
if <> then //Default if block
...
end
else{
...}::control//New snap-on else
else if <> then{
...}::control//New else if
//Example:
if <foo> then
...
end
else if <bar> then{
...}::control//Presumably these would blend together better
The idea is that you attach the else and else if onto the if, and it makes it one big block all on the same line, instead of it gradually becoming further and further right the more else ifs you add.
Sorry if I didn't explain this very well, it's just a random idea that popped into my head.
And all the world over, each nation's the same,
They've simply no notion of playing the game.
They argue with umpires, they cheer when they've won,
And they practice beforehand, which ruins the fun!
- FancyFoxy
- Scratcher
500+ posts
So-called "L" blocks: snap-on else & else if
Semi-support? While I would definitely find this useful for the cases where I don't think I need an else, it may come off as confusing.
THIS IS MY SIGNATURE. THIS MEANS IT IS AN AUTOMATIC MESSAGE THAT APPEARS AT THE BOTTOM OF ALL MY POSTS.
Hi! I'm FancyFoxy! I create animations and games that were never, EVER meant to be taken seriously.
FancyFoxy Heroes and #Thanksgiving are some of my latest projects, check them out!
- DaEpikDude
- Scratcher
1000+ posts
So-called "L" blocks: snap-on else & else if
I understand that, but sometimes it's annoying when you have lots of else if's. I don't see a problem with just using the If else block we already have. No support.
For example:
if <> thenSometimes all those indents get pretty annoying.
...
else
if <> then
...
else
if <> then
...
else
if <> then
...
else
...//See how far right this goes after just 4 else if's?
end
end
end
end
Yeah, I'm not sure how to introduce the concept properly, or how to explain that they can only attach to if's and so on. Semi-support? While I would definitely find this useful for the cases where I don't think I need an else, it may come off as confusing.
And all the world over, each nation's the same,
They've simply no notion of playing the game.
They argue with umpires, they cheer when they've won,
And they practice beforehand, which ruins the fun!
- Charles12310
- Scratcher
1000+ posts
So-called "L" blocks: snap-on else & else if
No Support. This could cause confusion. However, I believe there would be another way to do this. There would be this option to expend an “if, then, else” block by a certain amount just by right clicking it. Like if you want 3 else block inputs, right click on it, choose the option called “Expand”, it will tell you how much you have, but can only have a minimum of 10 though. Since the example is 3 blocks, type 3, to get this:
if <> then {
} else {
} else {
} else {
} :: control
A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
- -legit
- Scratcher
100+ posts
So-called "L" blocks: snap-on else & else if
Agree with expand! No Support. This could cause confusion. However, I believe there would be another way to do this. There would be this option to expend an “if, then, else” block by a certain amount just by right clicking it. Like if you want 3 else block inputs, right click on it, choose the option called “Expand”, it will tell you how much you have, but can only have a minimum of 10 though. Since the example is 3 blocks, type 3, to get this:if <> then {
} else {
} else {
} else {
} :: control
- walkcycle
- Scratcher
500+ posts
So-called "L" blocks: snap-on else & else if
Support. I like this creativity for new ideas on how to do Scratch blocks. And because they would be labelled, it would be clear what the blocks do. The only trick is coming up with a reliable visual grammar for the new snap on.
- DaEpikDude
- Scratcher
1000+ posts
So-called "L" blocks: snap-on else & else if
Ooh, yeah, I like the idea of expanding an if…else statement. My only problem is that shouldn't they become else if's instead of else's? No Support. This could cause confusion. However, I believe there would be another way to do this. There would be this option to expend an “if, then, else” block by a certain amount just by right clicking it. Like if you want 3 else block inputs, right click on it, choose the option called “Expand”, it will tell you how much you have, but can only have a minimum of 10 though. Since the example is 3 blocks, type 3, to get this:if <> then {
} else {
} else {
} else {
} :: control
Yeah, the visuals is the main problem with my idea… Support. I like this creativity for new ideas on how to do Scratch blocks. And because they would be labelled, it would be clear what the blocks do. The only trick is coming up with a reliable visual grammar for the new snap on.
And all the world over, each nation's the same,
They've simply no notion of playing the game.
They argue with umpires, they cheer when they've won,
And they practice beforehand, which ruins the fun!
- Fupicat
- Scratcher
1000+ posts
So-called "L" blocks: snap-on else & else if
I don't see this as annoying, but rather as a way to easily identify which block is which. It's also more similar to some other text based languages. For example, you can't do this:I understand that, but sometimes it's annoying when you have lots of else if's. -snip-
For example:if <> thenSometimes all those indents get pretty annoying.
...
else
if <> then
...
else
if <> then
...
else
if <> then
...
else
...//See how far right this goes after just 4 else if's?
end
end
end
end
if <>
else
if <>
else
if <>
else
if <>
else
if <>
else
end
end
end
end
end
if <>
else
if <>
else
if <>
else
if <>
else
end
end
end
end
- DaEpikDude
- Scratcher
1000+ posts
So-called "L" blocks: snap-on else & else if
Fair enough, but I think they're both ways of telling where the statement ends: in the Scratch form, the first “else” contains every other else statement, rather than the other form where they are sequential. It really just depends on how you think of it: do you think they should be sequential, or do you think the first statement should contain all the other ones?I don't see this as annoying, but rather as a way to easily identify which block is which. It's also more similar to some other text based languages. For example, you can't do this:I understand that, but sometimes it's annoying when you have lots of else if's. -snip-
For example:if <> thenSometimes all those indents get pretty annoying.
...
else
if <> then
...
else
if <> then
...
else
if <> then
...
else
...//See how far right this goes after just 4 else if's?
end
end
end
endYou have to do this:if <>
else
if <>
else
if <>
else
if <>
else
if <>
else
end
end
end
end
endSo you can know exactly where each loop ends.if <>
else
if <>
else
if <>
else
if <>
else
end
end
end
end
Side note: there are languages where they're sequential, for example C++:
if (so and so) {
...
} else if (such and such) {
...
} else if (whatever) {
...
} else {
....
}
Last edited by DaEpikDude (Aug. 28, 2017 22:52:35)
And all the world over, each nation's the same,
They've simply no notion of playing the game.
They argue with umpires, they cheer when they've won,
And they practice beforehand, which ruins the fun!
- Charles12310
- Scratcher
1000+ posts
So-called "L" blocks: snap-on else & else if
Yes.Ooh, yeah, I like the idea of expanding an if…else statement. My only problem is that shouldn't they become else if's instead of else's? No Support. This could cause confusion. However, I believe there would be another way to do this. There would be this option to expend an “if, then, else” block by a certain amount just by right clicking it. Like if you want 3 else block inputs, right click on it, choose the option called “Expand”, it will tell you how much you have, but can only have a minimum of 10 though. Since the example is 3 blocks, type 3, to get this:if <> then {
} else {
} else {
} else {
} :: controlYeah, the visuals is the main problem with my idea… Support. I like this creativity for new ideas on how to do Scratch blocks. And because they would be labelled, it would be clear what the blocks do. The only trick is coming up with a reliable visual grammar for the new snap on.
A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
- DaEpikDude
- Scratcher
1000+ posts
So-called "L" blocks: snap-on else & else if
Ok, I thought so.Yes. -snip-
Also I'm assuming you meant maximum, not minimum.
My only other problem with your idea is what if you have like 10 else if's and you realise you have one too many? Unless there's a delete button for the extensions, it'd be really inconvenient to have to make another 9-long thing if you accidentally put one too many.
Last edited by DaEpikDude (Aug. 29, 2017 00:39:08)
And all the world over, each nation's the same,
They've simply no notion of playing the game.
They argue with umpires, they cheer when they've won,
And they practice beforehand, which ruins the fun!
- I-Iz-A-Litten
- Scratcher
1000+ posts
So-called "L" blocks: snap-on else & else if
No Support. This could cause confusion. However, I believe there would be another way to do this. There would be this option to expend an “if, then, else” block by a certain amount just by right clicking it. Like if you want 3 else block inputs, right click on it, choose the option called “Expand”, it will tell you how much you have, but can only have a minimum of 10 though. Since the example is 3 blocks, type 3, to get this:if <> then {
} else {
} else {
} else {
} :: control
^^^ yeah, that would be much better
under penalty of law this signature is not to be removed except by the consumer
- Discussion Forums
- » Suggestions
- » So-called "L" blocks: snap-on else & else if