Discuss Scratch
- Discussion Forums
- » Suggestions
- » make the ask bock a reporter
- Maximouse
-
1000+ posts
make the ask bock a reporter
Not necessarily better – I think it's confusing, although C++ has something similar (the >> operator). A better way to do this would beset [foo v] to ask [What's your name?] and wait :: sensing
- IceCreamTub
-
1000+ posts
make the ask bock a reporter
No support, too ambiguous and scratch is meant for younger people thus less complicated coding is involved
- mybearworld
-
1000+ posts
make the ask bock a reporter
[View post]A better way to do this would beOkay, then also makeset [foo v] to ask [What's your name?] and wait :: sensing
set [foo v] to (2) + (3) :: operatorsSee? That should be “workarounded” with
set [foo v] to x position :: motion
set [foo v] to ((2) + (3))And, as well,
set [foo v] to (x position)
set [foo v] to (ask [What's your name?] and wait)
Last edited by mybearworld (June 26, 2021 20:11:06)
- mybearworld
-
1000+ posts
make the ask bock a reporter
[View post]No support, too ambiguous and scratch is meant for younger people thus less complicated coding is involvedAmbigious? Python and JS have this.
print(input("What's your name?"))
console.log(prompt("What's your name?"));
- rdococ
-
1000+ posts
make the ask bock a reporter
This! Scratch reporters are meant to be the things that perform calculations and return results, not produce visible changes on their own. Reporters that perform actions like command blocks do would just confuse everything. Scratch operates under the assumption that all reporter blocks have no side effects. (That is, it doesn't matter in what order two reporter blocks get called, or whether a reporter block gets called at all if its result doesn't matter).
An "ask and wait“ reporter would violate this principle. Suddenly, Scratch would have to standardize the order in which reporters are calculated, and whether the ”or“ and ”and" boolean blocks must always evaluate the right side. This would make it much harder to ensure backwards compatibility.
While many programming languages have this, I don't think it's a good feature for Scratch.
- PkmnQ
-
1000+ posts
make the ask bock a reporter
Fine I'll explain more why it's better. So this suggestion has the problem of being a reporter with side effects. And the ask and wait block has the problem of having a useless answer block. With the set to ask and wait block, both of those are solved.[View post]A better way to do this would beOkay, then also makeset [foo v] to ask [What's your name?] and wait :: sensingset [foo v] to (2) + (3) :: operatorsSee? That should be “workarounded” with
set [foo v] to x position :: motionset [foo v] to ((2) + (3))And, as well,
set [foo v] to (x position)set [foo v] to (ask [What's your name?] and wait)
- Greg8128
-
500+ posts
make the ask bock a reporter
I agree with pkmnq.[View post]A better way to do this would beOkay, then also makeset [foo v] to ask [What's your name?] and wait :: sensingset [foo v] to (2) + (3) :: operatorsSee? That should be “workarounded” with
set [foo v] to x position :: motionset [foo v] to ((2) + (3))And, as well,
set [foo v] to (x position)set [foo v] to (ask [What's your name?] and wait)
Scratch often changes how it processes reporter blocks. For example, in Scratch 2, the “and” block would skip evaluating the second argument if the first argument was false. Now, it always checks both arguments. This would create yet another way for the Scratch team to break backwards compatibility.
For example, see how this choice changes what the following block does:
set [baz v] to <<> and <(ask ["bar"] and wait ::sensing) = (quux)>>
Last edited by Greg8128 (June 27, 2021 01:45:57)
- DarthVader4Life
-
1000+ posts
make the ask bock a reporter
I don't believe that there should be any change to the ask block at all. By now, everyone is used to it as it is, and there's no point in changing it anymore. Scratch is meant to introductory, and
ask [] and waitseems more introductory than
(ask [] and wait :: reporter :: sensing)
- mybearworld
-
1000+ posts
make the ask bock a reporter
[View post]The entire point of why I made my (now merged) duplicate, was so you don't have to doFine I'll explain more why it's better. So this suggestion has the problem of being a reporter with side effects. And the ask and wait block has the problem of having a useless answer block. With the set to ask and wait block, both of those are solved.[View post]A better way to do this would beOkay, then also makeset [foo v] to ask [What's your name?] and wait :: sensingset [foo v] to (2) + (3) :: operatorsSee? That should be “workarounded” with
set [foo v] to x position :: motionset [foo v] to ((2) + (3))And, as well,
set [foo v] to (x position)set [foo v] to (ask [What's your name?] and wait)
ask [What's your name?] and wait
set [name v] to (answer)
ask [How old are you?] and wait
set [age v] to (answer)
say (join [You are ] (join (answer) (join [and you are] (join (age) [years old.]))))
- PkmnQ
-
1000+ posts
make the ask bock a reporter
I know, but it has none of the problems of that.[View post]The entire point of why I made my (now merged) duplicate, was so you don't have to doFine I'll explain more why it's better. So this suggestion has the problem of being a reporter with side effects. And the ask and wait block has the problem of having a useless answer block. With the set to ask and wait block, both of those are solved.[View post]A better way to do this would beOkay, then also makeset [foo v] to ask [What's your name?] and wait :: sensingset [foo v] to (2) + (3) :: operatorsSee? That should be “workarounded” with
set [foo v] to x position :: motionset [foo v] to ((2) + (3))And, as well,
set [foo v] to (x position)set [foo v] to (ask [What's your name?] and wait)ask [What's your name?] and wait
set [name v] to (answer)
ask [How old are you?] and wait
set [age v] to (answer)
say (join [You are ] (join (answer) (join [and you are] (join (age) [years old.]))))
- gosoccerboy5
-
1000+ posts
make the ask bock a reporter
Offtopic, but this problem would be essentially removed if we had custom reporters..
- Maximouse
-
1000+ posts
make the ask bock a reporter
I don't think suggesting an alternative solution is off topic. Offtopic, but this problem would be essentially removed if we had custom reporters..
- EatNYeet
-
500+ posts
make the ask bock a reporter
A bit of a situation…
(ask (ask [] and wait::sensing)::sensing)
- samq64
-
1000+ posts
make the ask bock a reporter
Not a problem. (although I don't know who would do that.) It would just ask a blank string and then ask what you entered the first time and then report the second answer. A bit of a situation…(ask (ask [] and wait::sensing)::sensing)
- Codingfairy07
-
500+ posts
make the ask bock a reporter
Well, we want to keep Scratch simple, and this isn't that simple, and goes against the Design goals,[View post]No support, too ambiguous and scratch is meant for younger people thus less complicated coding is involvedAmbigious? Python and JS have this.print(input("What's your name?"))console.log(prompt("What's your name?"));
which say Scratch should be easy to start out with. The ask reporter isn't simple, this could be easily workarounded (is that even a word), and I like the ask block the way it is, so no support!
- samq64
-
1000+ posts
make the ask bock a reporter
Well, I mean it's removing a block from the editor, which apparently improves the user experience.Well, we want to keep Scratch simple, and this isn't that simple, and goes against the Design goals,[View post]No support, too ambiguous and scratch is meant for younger people thus less complicated coding is involvedAmbigious? Python and JS have this.print(input("What's your name?"))console.log(prompt("What's your name?"));
which say Scratch should be easy to start out with. The ask reporter isn't simple, this could be easily workarounded (is that even a word), and I like the ask block the way it is, so no support!
( Despite the common drive to add more features to software products, we have found that reducing the number of features often improves the user experience. What initially seems like a constraint or limitation can foster new forms of creativity.source)
Last edited by samq64 (June 29, 2021 22:44:39)
- the2000
-
1000+ posts
make the ask bock a reporter
That doesn't (or at least, Well, I mean it's removing a block from the editor, which apparently improves the user experience. shouldn't) mean “we should have as few blocks as possible”, it just means that Scratch should have very few distinct features. The more features (not blocks!) that the software has, the longer it takes for a new user to learn.( Despite the common drive to add more features to software products, we have found that reducing the number of features often improves the user experience. What initially seems like a constraint or limitation can foster new forms of creativity.source)
- mybearworld
-
1000+ posts
make the ask bock a reporter
[View post]Yes, it is simple. It asks a question, and returns an answer. If that's not simple, then remove the current ask block.Well, we want to keep Scratch simple, and this isn't that simple, and goes against the Design goals,[View post]No support, too ambiguous and scratch is meant for younger people thus less complicated coding is involvedAmbigious? Python and JS have this.print(input("What's your name?"))console.log(prompt("What's your name?"));
which say Scratch should be easy to start out with. The ask reporter isn't simple, this could be easily workarounded (is that even a word), and I like the ask block the way it is, so no support!
- k7e
-
1000+ posts
make the ask bock a reporter
It asks the one in the middle, and then asks the answer. A bit of a situation…(ask (ask [] and wait::sensing)::sensing)
- DJUmbreon2
-
100+ posts
make the ask bock a reporter
so you’re telling me it defeats the purpose of reporters I don't like this idea because it creates the idea of a reporter block which can pause the script that it's running in. Reporters are supposed to give instant output, not pause like this block does.
- Discussion Forums
- » Suggestions
-
» make the ask bock a reporter