Discuss Scratch

Ray-Style
Scratcher
4 posts

Forever if

I think it will be more efficient to have a forever if in the control section like 1.4
please think about my idea
NoxSpooth
Scratcher
1000+ posts

Forever if

Just do this:
forever
if
end
end
jvvg
Scratcher
1000+ posts

Forever if

NoxSpooth wrote:

Just do this:
forever
if
end
end
Yeah, I believe they removed it because the workaround was so simple.


Professional web developer and lead engineer on the Scratch Wiki
Maybe the Scratch Team isn't so badWhy the April Fools' Day forum didn't work last year
xlk
Scratcher
100+ posts

Forever if

LOL, you got it backwards!
it's like this:
if <for some reason this maters>
forever
find alternative work arounds...
end
end

DotDash
Scratcher
1000+ posts

Forever if

xlk wrote:

LOL, you got it backwards!
it's like this:
if <for some reason this maters>
forever
find alternative work arounds...
end
end
No, jvvg and NoxSpooth are actually right.

My browser / operating system: MacOS Macintosh X 10.8.5, Chrome 29.0.1547.76, Flash 11.8 (release 800)
xlk
Scratcher
100+ posts

Forever if

DotDash wrote:

xlk wrote:

LOL, you got it backwards!
it's like this:
if <for some reason this maters>
forever
find alternative work arounds...
end
end
No, jvvg and NoxSpooth are actually right.
I specifically remember the old forever if block being a real pain due to it's similarity to repeat until, yet just eternally repeating once the boolean was true.
Maybe it's just me remembering wrong though… been a long time since I've looked at diferences between 1.4 and 2.0

NoxSpooth
Scratcher
1000+ posts

Forever if

xlk wrote:

LOL, you got it backwards!
it's like this:
if <for some reason this maters>
forever
find alternative work arounds...
end
end
Hm, I think if you do like that, the script inside the forever block will keep happening forever and forever…
xlk
Scratcher
100+ posts

Forever if


Ok, nevemind, just tested it, and it is with the “if” inside. Odd, I do recall having it behave at one point as if the “if” was outside…
Anywho, my memory sucks.

Last edited by xlk (Nov. 2, 2013 10:55:56)


blob8108
Scratcher
1000+ posts

Forever if

xlk wrote:

Ok, nevemind, just tested it, and it is with the “if” inside. Odd, I do recall having it behave at one point as if the “if” was outside…
I believe they removed forever if
forever if <>
Because people kept mistaking it for this:
if <>
forever
end
end
Which it is not.

tosh · slowly becoming a grown-up adult and very confused about it
s_federici
Scratcher
500+ posts

Forever if

liam48D
Scratcher
1000+ posts

Forever if

I think they should have kept it, because it's great for 1s1s people.

forever if <(mouse x) < (mouse y)>
say [Hi]

202e-202e-202e-202e-202e UNI-CODE~~~~~
1234abcdcba4321
Scratcher
1000+ posts

Forever if

liam48D wrote:

I think they should have kept it, because it's great for 1s1s people.

forever if <(mouse x) < (mouse y)>
say [Hi]
Still just as easy.
forever
if <(mouse x) < (mouse y)> then
say [Hi]

I'd highly appreciate it if you were to follow me. Don't forget to go to my profile.
All of my programming suggestions <— You should really get the suggestions move back to the suggestions forum!
Five hundred posts! I never expected to get up there… In only 2-3 months.
Does anyone know what a signature is? I mean, I've already seen 6-7 people get confused.
AonymousProfessor
Scratcher
100+ posts

Forever if

liam48D wrote:

I think they should have kept it, because it's great for 1s1s people.

forever if <(mouse x) < (mouse y)>
say [Hi]
I don't really think it's that great for 1s1s people, seeing as how then they can really only have one if block…

I am @AonymousGuy's test account!

The word “test” in test accounts is outdated. That is why mine has professor instead!

Thanks @MicroMacro for the profile image!
s_federici
Scratcher
500+ posts

Forever if

AonymousProfessor wrote:

I don't really think it's that great for 1s1s people

I don't know if it is perfect for 1s1s, but I'm sure that my students like it a lot
firedrake969_test
Scratcher
500+ posts

Forever if

s_federici wrote:

AonymousProfessor wrote:

I don't really think it's that great for 1s1s people

I don't know if it is perfect for 1s1s, but I'm sure that my students like it a lot
There's a lot of things that'd be nicer for us, but won't be implemented

The block is less efficient, vague, and redundant.

Alt account of Firedrake969.

Rocket II: A black and white bitmap space game!

I seek not fame, but education.

;
s_federici
Scratcher
500+ posts

Forever if

firedrake969_test wrote:

The block is less efficient, vague, and redundant.

I agree that it is less efficient and redundant. But Scratch is a programming language for learners (so inefficiency is not a big concern). And Scratch is the Reign of Redundancy: you could reimplement the behaviour of all blocks in the Movement category by using just two blocks from the same category. But I don't think that the FOREVER IF is vague. As I said, my students use it consistently without any problem.
firedrake969_test
Scratcher
500+ posts

Forever if

The other workarounds are (mostly) hard.

The forever if workaround is literally one block more.

Alt account of Firedrake969.

Rocket II: A black and white bitmap space game!

I seek not fame, but education.

;
1234abcdcba4321
Scratcher
1000+ posts

Forever if

firedrake969_test wrote:

The other workarounds are (mostly) hard.

The forever if workaround is literally one block more.
Yeah, mostly. Like, not, variable, x pos, y pos, that stuff…
Which is just one (two?) input(s) more.

I'd highly appreciate it if you were to follow me. Don't forget to go to my profile.
All of my programming suggestions <— You should really get the suggestions move back to the suggestions forum!
Five hundred posts! I never expected to get up there… In only 2-3 months.
Does anyone know what a signature is? I mean, I've already seen 6-7 people get confused.
AonymousGuy
Scratcher
1000+ posts

Forever if

s_federici wrote:

I don't think that the FOREVER IF is vague. As I said, my students use it consistently without any problem.
When I first found Scratch, it was horribly vague. It also seems to teach bad programming habits – instead of dedicating an entire loop to check one teensy condition, just pack them all together.
s_federici
Scratcher
500+ posts

Forever if

AonymousGuy wrote:

When I first found Scratch, it was horribly vague. It also seems to teach bad programming habits

This would be true if Scratch would just be a programming language. But Scratch is not. Indeed it is the most natural way of learning logical thinking. It is really fantastic seeing that you can code a solution with Scratch almost by using the same words you would use in order to describe this solution in a natural language (that is English, Italian, French, etc). What at the beginning is really hard to understand to students is, for example, that the IF block is not something that is checked continuosly, but only at very precise moments. So, to them, the FOREVER IF block is exactly what they think the IF block should be. They use it naturally in highly concurrent projects. Everything works as expected.

To students that are non majoring information science (that is, to all the audience to which Scratch is addressed) the very interesting feature of Scratch if that there is a one-to-one mapping from their mental solution to the real solution. There is not need of abstraction: sprites and their natural properties (position, size, volume) are exactly what they represent.

All the “translation burden” (mapping logical steps to commands, features to variables, etc) will come next, for efficiency reasons (but efficiency is just one of the branches of computer science). And, at that point, they will already have acquired all the knowledge and understanding they need. Otherwise, as I said, you could just use two blocks from the Movement category: why to have all the other ones? But, the answer is clear: so to make the path to programming as easier as possible (and only as difficult as strictly necessary)

Powered by DjangoBB