Discuss Scratch
- Discussion Forums
- » Suggestions
- » Better boolean inputs — 12:2 Support
- Cyoce
-
500+ posts
Better boolean inputs — 12:2 Support
I personally find it annoying how the boolean inputs work on scratch, especially with how they handle inputting variables (they don't). For example:
instead of just
if (input :: motion) thenThis would work just like if input = true, but since inputting a boolean has an implied (boolean = true), having to manually enter (boolean = true) is redundant and frankly a waste of time. We should allow boolean inputs to accept text, that way we can simply type “true”, or we can directly input variables, like any other programming language! Imagine if in Java, for example, you had to put up with
end // does not exist
// instead, we must waste time with
if <(input :: motion) = [true]> then
end
// I propose:
if <[ ] :: control> then
end
if(myBoolean == true)
{
}
if(myBoolean)
{
}
Supporters :: grey cstart
Scratchifier :: operators
theonlygusti :: operators
AonymousGuy :: operators
Firedrake969 :: operators
djdolphin :: operators
MegaApuTurkUltra :: operators
ShadowFlareX :: operators
J-man2 :: operators
NoMod-Programming :: operators
ealgase :: operators
_Hope :: operators
Superdoggy :: operators
Length: 12 :: cend
Opposers :: grey cstart
Randomperson1789
TechnoDriveX
Length: 2 :: cend
Fickle Pickes :: grey cstart
TheHockeyist :: pen
Length: 1 :: cend
set [Support Ratio v] to (((length of [Supporters v]) / (length of [Opposers v])) + ((length of [Fickle Pickles v]) * (0)))
Last edited by Cyoce (Dec. 14, 2014 13:50:35)
- Blueinkproductions
-
1000+ posts
Better boolean inputs — 12:2 Support
This would be an awesome addition to Scratch for the more advanced users, but I doubt it would make very much sense to a beginner at programming, which is the target audience of Scratch.
- Scratchifier
-
1000+ posts
Better boolean inputs — 12:2 Support
I personally find it annoying how the boolean inputs work on scratch, especially with how they handle inputting variables (they don't). For example:if (input :: motion) thenThis would work just like if input = true, but since inputting a boolean has an implied (boolean = true), having to manually enter (boolean = true) is redundant and frankly a waste of time. We should allow boolean inputs to accept text, that way we can simply type “true”, or we can directly input variables, like any other programming language! Imagine if in Java, for example, you had to put up with
end // does not exist
// instead, we must waste time with
if <(input :: motion) = [true]> then
end
// I propose:
if <[ ] :: control> then
endinstead of justif(myBoolean == true)
{
}if(myBoolean)
{
}
I guess that it wouldn't hurt.

I don't use my variables as Booleans often, but when I do, I usually like making it 0 for false and 1 for true if I'm just scripting or 0 for false and PotatoesRuleTheEarthLelelelelelMUAHAHADoomWillComeToAllYeahhhhhh!!!!!!! for true if I'm bored. xD
Support, anyway.
It would also be nice to have “create a Boolean” where you don't have to reset the variables every time the green flag is clicked, but instead, they would automatically be set to “0” when the green flag is clicked by Scratch.
- theonlygusti
-
1000+ posts
Better boolean inputs — 12:2 Support
Total support! This is needed.
Several solutions:
Honestly though, I don't know why scratch has separated booleans and reporters at all, a Boolean is a reporter, it's just a reporter which reports true or false.
This would be an awesome addition to Scratch for the more advanced users, but I doubt it would make very much sense to a beginner at programming, which is the target audience of Scratch.
Several solutions:
- When you try to put a variable into a predicate slot, it doesn't show the White border. This will discourage new Scratchers from finding out about it for longer, so delay discovery and confusion.
- Make variables have an option to be a Boolean reporter, which then makes it hexagonal.
Honestly though, I don't know why scratch has separated booleans and reporters at all, a Boolean is a reporter, it's just a reporter which reports true or false.
- theonlygusti
-
1000+ posts
Better boolean inputs — 12:2 Support
here and it works just as expected.Oh, sorry! Even better yet, just let users drop reporters in boolean inputs. I enabled that
This is what I thought the original post was talking about, I only skim read it *insert guilty emoji here*.
No support for the original idea, but support for this.
- Cyoce
-
500+ posts
Better boolean inputs — 12:2 Support
That is exactly what I'm suggesting, with the addition of also being able to type in text. Here's what I would want it to do:here and it works just as expected.Oh, sorry! Even better yet, just let users drop reporters in boolean inputs. I enabled that
This is what I thought the original post was talking about, I only skim read it *insert guilty emoji here*.
No support for the original idea, but support for this.
if <touching [wall v]?> then
end
if <myBooleanVariable :: variables> then
end
if [true v] then
end
// although the last one isn't that useful for if statements, it would be nice for custom blocks
jump with gravity [true v] :: custom-arg
- RandomPerson1789
-
100+ posts
Better boolean inputs — 12:2 Support
You just stated a easy workaround, so no support
- AonymousGuy
-
1000+ posts
Better boolean inputs — 12:2 Support
easy workaround, so no supportIt may be easy, but also slows down the project by a slight bit, and doesn't teach about the future of coding. You just stated a
For example, in Java, I still sometimes waste data by writing this code:
if (someBoolean == true) { }
For now, though, variables can be hacked in to predicate slots if it really is important.
- Firedrake969
-
1000+ posts
Better boolean inputs — 12:2 Support
I do the same thing.easy workaround, so no supportIt may be easy, but also slows down the project by a slight bit, and doesn't teach about the future of coding. You just stated a
For example, in Java, I still sometimes waste data by writing this code:This is inefficient programming, and programming is best when it is efficient. Thus, I would like to see this so newer programmers are introduced to the concept earlier.if (someBoolean == true) { }
For now, though, variables can be hacked in to predicate slots if it really is important.
+1
(Of course, those who “hack” variables probably know coding conventions anyways)
- Cyoce
-
500+ posts
Better boolean inputs — 12:2 Support
+1?I do the same thing.easy workaround, so no supportIt may be easy, but also slows down the project by a slight bit, and doesn't teach about the future of coding. You just stated a
For example, in Java, I still sometimes waste data by writing this code:This is inefficient programming, and programming is best when it is efficient. Thus, I would like to see this so newer programmers are introduced to the concept earlier.if (someBoolean == true) { }
For now, though, variables can be hacked in to predicate slots if it really is important.
+1
(Of course, those who “hack” variables probably know coding conventions anyways)
- Scratchifier
-
1000+ posts
Better boolean inputs — 12:2 Support
+1?I do the same thing.easy workaround, so no supportIt may be easy, but also slows down the project by a slight bit, and doesn't teach about the future of coding. You just stated a
For example, in Java, I still sometimes waste data by writing this code:This is inefficient programming, and programming is best when it is efficient. Thus, I would like to see this so newer programmers are introduced to the concept earlier.if (someBoolean == true) { }
For now, though, variables can be hacked in to predicate slots if it really is important.
+1
(Of course, those who “hack” variables probably know coding conventions anyways)
+1 means support.

- Cyoce
-
500+ posts
Better boolean inputs — 12:2 Support
Oh ok.+1?I do the same thing.easy workaround, so no supportIt may be easy, but also slows down the project by a slight bit, and doesn't teach about the future of coding. You just stated a
For example, in Java, I still sometimes waste data by writing this code:This is inefficient programming, and programming is best when it is efficient. Thus, I would like to see this so newer programmers are introduced to the concept earlier.if (someBoolean == true) { }
For now, though, variables can be hacked in to predicate slots if it really is important.
+1
(Of course, those who “hack” variables probably know coding conventions anyways)
+1 means support.
- TheHockeyist
-
1000+ posts
Better boolean inputs — 12:2 Support
Hmmm… while this would be nice and useful, I don't think New Scratchers could understand it.
Indifferent.
Indifferent.
- Cyoce
-
500+ posts
Better boolean inputs — 12:2 Support
What's not to understand? It would be exactly the same, but with the ability to drag in variables. One could argue that it's Hmmm… while this would be nice and useful, I don't think New Scratchers could understand it.more confusing to have an input box that you can only drag specific things into.
Indifferent.
- TheHockeyist
-
1000+ posts
Better boolean inputs — 12:2 Support
What's not to understand? It would be exactly the same, but with the ability to drag in variables. One could argue that it's Hmmm… while this would be nice and useful, I don't think New Scratchers could understand it.more confusing to have an input box that you can only drag specific things into.
Indifferent.
I feel like it would be too confusing. It would be useful for the older Scratchers, not so much for the newer ones.
As I said above, I'm indifferent.
- TimothyLawyer
-
1000+ posts
Better boolean inputs — 12:2 Support
Per this, no support. Scratch is a programming language for beginner programmers. Explicit boolean comparisons is a good thing, and at most a minor burden for more advanced programmers. I feel like it would be too confusing. It would be useful for the older Scratchers, not so much for the newer ones.
- theonlygusti
-
1000+ posts
Better boolean inputs — 12:2 Support
Separating booleans from reporters is not a good thing, because booleans are reporters, and the sooner people learn that the easier future programming will be.Per this, no support. Scratch is a programming language for beginner programmers. Explicit boolean comparisons is a good thing, and at most a minor burden for more advanced programmers. I feel like it would be too confusing. It would be useful for the older Scratchers, not so much for the newer ones.
- TimothyLawyer
-
1000+ posts
Better boolean inputs — 12:2 Support
not a good thing,Booleans can be used as reporters. Separating booleans from reporters is
- Discussion Forums
- » Suggestions
-
» Better boolean inputs — 12:2 Support