Discuss Scratch

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…
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!
Fupicat
Scratcher
1000+ posts

So-called "L" blocks: snap-on else & else if

I don't see a problem with just using the If else block we already have. No support.



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

Fupicat wrote:

I don't see a problem with just using the If else block we already have. No support.
I understand that, but sometimes it's annoying when you have lots of else if's.
For example:
if <> then 
...
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
Sometimes all those indents get pretty annoying.

FancyFoxy wrote:

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.
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.

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

Charles12310 wrote:

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
Agree with expand!
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

Charles12310 wrote:

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
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?

walkcycle wrote:

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.
Yeah, the visuals is the main problem with my idea…

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

DaEpikDude wrote:

Fupicat wrote:

-snip-
I understand that, but sometimes it's annoying when you have lots of else if's.
For example:
if <> then 
...
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
Sometimes all those indents get pretty annoying.
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:
if <>
else
if <>
else
if <>
else
if <>
else
if <>
else
end
end
end
end
end
You have to do this:
if <>
else
if <>
else
if <>
else
if <>
else
end
end
end
end
So you can know exactly where each loop ends.



DaEpikDude
Scratcher
1000+ posts

So-called "L" blocks: snap-on else & else if

Fupicat wrote:

DaEpikDude wrote:

Fupicat wrote:

-snip-
I understand that, but sometimes it's annoying when you have lots of else if's.
For example:
if <> then 
...
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
Sometimes all those indents get pretty annoying.
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:
if <>
else
if <>
else
if <>
else
if <>
else
if <>
else
end
end
end
end
end
You have to do this:
if <>
else
if <>
else
if <>
else
if <>
else
end
end
end
end
So you can know exactly where each loop ends.
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?
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 {
....
}
Not sure what language you're talking about, but the other languages I've seen (all 3 of them) are all sequential.

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

DaEpikDude wrote:

Charles12310 wrote:

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
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?

walkcycle wrote:

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.
Yeah, the visuals is the main problem with my idea…
Yes.


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

Charles12310 wrote:

DaEpikDude wrote:

-snip-
Yes.
Ok, I thought so.
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

Charles12310 wrote:

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

Powered by DjangoBB