Discuss Scratch
- Discussion Forums
- » Suggestions
- » jump block
- MrFluffyPenguins
-
1000+ posts
jump block
bump
also can someone please explain how come people would no support because it happens to be in a different programming language and also people on that programming language think its bad for some reason
also can someone please explain how come people would no support because it happens to be in a different programming language and also people on that programming language think its bad for some reason
- Flowermanvista
-
1000+ posts
jump block
What you've proposed is usually known as a “goto” in other languages. The main reason that is generally cited for gotos being bad is that they have a tendency to make “spaghetti code” - code whose flow of execution is very hard to follow, which makes maintaining it hard as well. bump
also can someone please explain how come people would no support because it happens to be in a different programming language and also people on that programming language think its bad for some reason
Others will tell you that gotos are not harmful if used responsibly - for example, a goto to break out of a deeply nested loop can be cleaner than other methods.
- MrFluffyPenguins
-
1000+ posts
jump block
So, because people use too much of these of their own free will, they say it's bad?What you've proposed is usually known as a “goto” in other languages. The main reason that is generally cited for gotos being bad is that they have a tendency to make “spaghetti code” - code whose flow of execution is very hard to follow, which makes maintaining it hard as well. bump
also can someone please explain how come people would no support because it happens to be in a different programming language and also people on that programming language think its bad for some reason
Others will tell you that gotos are not harmful if used responsibly - for example, a goto to break out of a deeply nested loop can be cleaner than other methods.
- BosenChang
-
1000+ posts
jump block
So, I'd say semi-support. This would help a little, but might make spaghetti code. Here is a good block idea:
start jump () :: controlAlso, this may be used to make forever loops, like
end jump () :: control
when [timer v]>(8)Another thing, can we change one of the blocks to:
end jump (1) :: control
move (10) steps
start jump (1) :: control
jump :: motion cap
- MrFluffyPenguins
-
1000+ posts
jump block
what would happen if you had 2 end jumps but only 1 start jump? So, I'd say semi-support. This would help a little, but might make spaghetti code. Here is a good block idea:start jump () :: controlAlso, this may be used to make forever loops, like
end jump () :: controlwhen [timer v]>(8)
end jump (1) :: control
move (10) steps
start jump (1) :: control
- skymover1239
-
500+ posts
jump block
Support this was so helpful in batch also I thank the blocks should look like this
goto () ::controlthe first one would jump two the second one
here () ::control
- Flowermanvista
-
1000+ posts
jump block
I don't think it's necessarily the same people who abuse gotos who say that they're bad. I believe it's mostly other people who have to mantain programs that abuse gotos who are saying that they're bad.So, because people use too much of these of their own free will, they say it's bad?What you've proposed is usually known as a “goto” in other languages. The main reason that is generally cited for gotos being bad is that they have a tendency to make “spaghetti code” - code whose flow of execution is very hard to follow, which makes maintaining it hard as well. bump
also can someone please explain how come people would no support because it happens to be in a different programming language and also people on that programming language think its bad for some reason
Others will tell you that gotos are not harmful if used responsibly - for example, a goto to break out of a deeply nested loop can be cleaner than other methods.
- ioton
-
500+ posts
jump block
Solution?
and an option disappears when there's already another land block that uses that option.
If you don't have a matching land block for the goto block, it does nothing.
If you don't have a matching goto block for the goto block, it does nothing.
goto [ v] :: controlThere's should be a choice to add an ID…
land [ v] :: control
and an option disappears when there's already another land block that uses that option.
If you don't have a matching land block for the goto block, it does nothing.
If you don't have a matching goto block for the goto block, it does nothing.
Last edited by ioton (Aug. 13, 2020 15:14:37)
- PkmnQ
-
1000+ posts
jump block
Ah, just like broadcasts. Solution?goto [ v] :: controlThere's should be a choice to add an ID…
land [ v] :: control
and an option disappears when there's already another land block that uses that option.
If you don't have a matching land block for the goto block, it does nothing.
If you don't have a matching goto block for the goto block, it does nothing.
- PkmnQ
-
1000+ posts
jump block
Ah, just like broadcasts. Solution?goto [ v] :: controlThere's should be a choice to add an ID…
land [ v] :: control
and an option disappears when there's already another land block that uses that option.
If you don't have a matching land block for the goto block, it does nothing.
If you don't have a matching goto block for the goto block, it does nothing.
(It posted twice!)
Last edited by PkmnQ (Aug. 13, 2020 15:48:46)
- HTML-Fan
-
1000+ posts
jump block
This is not a physics block. It goes to a specific part of the code, not actually jumping.Then please explain why it's a motion block and not a control block - the closest thing to jumping is forever.
I agree that it's a really primitive block. Scratch is more or less JS and JS is more advanced then C++ and I think that C++ has jump blocks - but I never used them. Assembler has them - but that's another thing. Jumping is for me like blocking code: Nope. Don't do it.
- Maximouse
-
1000+ posts
jump block
Yes, C++ has goto statements but they are almost never used, and in most cases using them is considered a bad practice. I agree that it's a really primitive block. Scratch is more or less JS and JS is more advanced then C++ and I think that C++ has jump blocks - but I never used them. Assembler has them - but that's another thing. Jumping is for me like blocking code: Nope. Don't do it.
- HTML-Fan
-
1000+ posts
jump block
Okay, you see, I wasn't even sure if they exist and I use C++ for years. It's just a bad thing. It makes me think “That's not the right way of doing that!” but sadly, Scratch is full of those things. I just say pen and multitasking. Yes, C++ has goto statements but they are almost never used, and in most cases using them is considered a bad practice.
- MrFluffyPenguins
-
1000+ posts
jump block
This is not a physics block. It goes to a specific part of the code, not actually jumping.Then please explain why it's a motion block and not a control block - the closest thing to jumping is forever.
I agree that it's a really primitive block. Scratch is more or less JS and JS is more advanced then C++ and I think that C++ has jump blocks - but I never used them. Assembler has them - but that's another thing. Jumping is for me like blocking code: Nope. Don't do it.
Also how is going to another place in the code like blocking code?i only made it a motion block because it was blue, just like the jump block in Human Resource Machine. I think this probably belongs in Control rather than Motion…
Also, it seems to me that the only reason people have for no supporting is that it happens to be in a different programming language and people don't use it in those. If you aren't going to use it, other people will. So instead of thinking of how “IT'S A BAD PRACTICE AND C++ HAS IT AND I DON'T USE IT”, why don't you… NOT use it? Then there wouldn't be an issue.
Last edited by MrFluffyPenguins (Aug. 14, 2020 13:39:10)
- Maximouse
-
1000+ posts
jump block
Both have better ways of doing. Also how is going to another place in the code like blocking code?
- HTML-Fan
-
1000+ posts
jump block
Yep. They both make me feel awful in the same way. It's just wrong in my mind. I understand that other people may like it, but I personally don't want those blocks.Both have better ways of doing. Also how is going to another place in the code like blocking code?
Last edited by HTML-Fan (Aug. 14, 2020 13:28:10)
- Flowermanvista
-
1000+ posts
jump block
Then just don't use them?Yep. They both make me feel awful in the same way. It's just wrong in my mind. I understand that other people may like it, but I personally don't want those blocks.Both have better ways of doing. Also how is going to another place in the code like blocking code?
- MrFluffyPenguins
-
1000+ posts
jump block
that's what's weird about this situation- people don't like a suggestion because they don't want it, but they won't even use it if it does get added, so what's the problem? they could just NOT USE THEM.Then just don't use them?Yep. They both make me feel awful in the same way. It's just wrong in my mind. I understand that other people may like it, but I personally don't want those blocks.Both have better ways of doing. Also how is going to another place in the code like blocking code?
it wouldn't affect them in any way if it does get added.
Last edited by MrFluffyPenguins (Aug. 14, 2020 13:39:27)
- HTML-Fan
-
1000+ posts
jump block
The thing is, just knowing that it exists in that context makes me feel bad. that's what's weird about this situation- people don't like a suggestion because they don't want it, but they won't even use it if it does get added, so what's the problem? they could just NOT USE THEM.
it wouldn't affect them in any way if it does get added.
- Maximouse
-
1000+ posts
jump block
Yeah, it just doesn't seem to fit with the rest of Scratch.The thing is, just knowing that it exists in that context makes me feel bad. that's what's weird about this situation- people don't like a suggestion because they don't want it, but they won't even use it if it does get added, so what's the problem? they could just NOT USE THEM.
it wouldn't affect them in any way if it does get added.
- Discussion Forums
- » Suggestions
-
» jump block