Discuss Scratch

Aldmors
Scratcher
4 posts

My blocks - Added the ability to return values

Hello,
I wanted to propose here the possibility of extending the functionality of My blocks and bringing it closer to the usual function we have in programming. So adding the ability to return values, I think it could significantly simplify the structure of blocks in many situations.


Issue on github
https://github.com/scratchfoundation/scratch-blocks/issues/3601#issuecomment-4603520729


My initial idea how to implement this

Aldmors
Scratcher
4 posts

My blocks - Added the ability to return values

My initial idea how to implement this

https://imgur.com/a/ENMs652

or on GitHub i send screens
r3hehehehehhe
Scratcher
500+ posts

My blocks - Added the ability to return values

seems too complicated for younger scratchers, so no support
Pixalperfect
Scratcher
500+ posts

My blocks - Added the ability to return values

i think this is technically a duplicate
Aldmors
Scratcher
4 posts

My blocks - Added the ability to return values

r3hehehehehhe wrote:

seems too complicated for younger scratchers, so no support

Why does this have to be so complicated? I am simply looking to extend custom blocks to return values, just like standard programming functions. While this is a universal concept in practice, used in all languages, Scratch offers no native way to demonstrate it to kids. When teaching, I find it incredibly limiting that I cannot show more advanced classes the possibilities with functions that return values.
flowerbonds007
Scratcher
4 posts

My blocks - Added the ability to return values

Yep, I agree that functionality like return values does not have to be dismissed as “too complex” for younger children. Keep in mind that an eight year-old that might find return values confusing is probably never going to touch My blocks for years, and if they do then they will just experiment or google it or something. I also had an idea that they could make a separate website called “Scratch Pro” or something with a more complete feature-set, such as removing scaling and moving limits, uncapping frames per second and window size, and adding blocks like return values. Doing this would make it much easier for people who are advancing in skill and programming knowledge to apply that skill without feeling like Scratch is limiting their potential.

Last edited by LittleGreyCells (June 7, 2026 17:22:22)

kyle_jm
Scratcher
100+ posts

My blocks - Added the ability to return values

r3hehehehehhe wrote:

seems too complicated for younger scratchers, so no support
I never get why people say things like this, there are already blocks that kids don't understand and guess what, they just ignore them. Why should Scratch be limited just because some kids will not fully understand something which they will just ignore until a later date
medians
Scratcher
1000+ posts

My blocks - Added the ability to return values

Aldmors wrote:

r3hehehehehhe wrote:

seems too complicated for younger scratchers, so no support

Why does this have to be so complicated? I am simply looking to extend custom blocks to return values, just like standard programming functions. While this is a universal concept in practice, used in all languages, Scratch offers no native way to demonstrate it to kids. When teaching, I find it incredibly limiting that I cannot show more advanced classes the possibilities with functions that return values.
I also don't get why this would be that complicated. Like, if some1 already understands custom blocks and reporters, I feel like custom reporters would make sense
some1atskool
Scratcher
100+ posts

My blocks - Added the ability to return values

medians wrote:

Aldmors wrote:

-snip-
I also don't get why this would be that complicated. Like, if some1 already understands custom blocks and reporters, I feel like custom reporters would make sense
medians why did you mention me in specific

i support, but would custom blocks have to become
custom boolean! :: custom boolean 
custom strings/number! :: custom reporter

define custom boolean
return <[x] > [y]> :: custom cap

when using return

Last edited by some1atskool (June 7, 2026 01:13:15)

LittleGreyCells
Scratch Team
1000+ posts

My blocks - Added the ability to return values

Leaving this open for discussion as it doesn't look like an exact dupe of the earlier linked suggestion.
Aldmors
Scratcher
4 posts

My blocks - Added the ability to return values

flowerbonds007 wrote:

Yep, I agree that functionality like return values does not have to be dismissed as “too complex” for younger children. Keep in mind that an eight year-old that might find return values confusing is probably never going to touch My blocks for years, and if they do then they will just experiment or google it or something. I also had an idea that they could make a separate website called “Scratch Pro” or something with a more complete feature-set, such as removing scaling and moving limits, uncapping frames per second and window size, and adding blocks like return values. Doing this would make it much easier for people who are advancing in skill and programming knowledge to apply that skill without feeling like Scratch is limiting their potential.
This is well thought out in Minecraft Education MakeCode, where we have a collapsible “advanced” category.

Regarding overly complex behavior, eight- or nine-year-olds don't understand the “if” concept. Should that be a reason to remove this block?

A function that returns a value is, you could say, the foundation of programming; practically all functions return values, and in practice, void is rarely used.

My arguments for:
1. Functions that return values ​​are a fundamental element of programming.
2. Even though the concept is “more advanced,” the extension still applies to my blocks, which are already more complex for kids.
3. Currently, my blocks are practically non-functional, and they mainly serve to group blocks.
4. Scratch should offer opportunities to introduce children and show them the basics of programming, including the return function.

Pixalperfect
Scratcher
500+ posts

My blocks - Added the ability to return values

thought this was a dupe but nah

support!

idk why people are saying this is complicated, it's just changing normal custom blocks to reporter/boolean types.

this is very useful for recreating blocks that don't exist or getting rid of stack blocks that use variables to report something. turbowap has this exact block (prob where the OP got the idea) and it works very well there
copperGolem14
Scratcher
22 posts

My blocks - Added the ability to return values

Isn’t this the same thing as putting a “set (variable) to ()”block at the end of a custom block?
I don’t think it’s necessary
PowPro1502
Scratcher
100+ posts

My blocks - Added the ability to return values

Pixalperfect wrote:

thought this was a dupe but nah

support!

idk why people are saying this is complicated, it's just changing normal custom blocks to reporter/boolean types.

this is very useful for recreating blocks that don't exist or getting rid of stack blocks that use variables to report something. turbowap has this exact block (prob where the OP got the idea) and it works very well there
It is a dupe.
CatPlusHouse
Scratcher
100+ posts

My blocks - Added the ability to return values

Aldmors wrote:

r3hehehehehhe wrote:

seems too complicated for younger scratchers, so no support

Why does this have to be so complicated? I am simply looking to extend custom blocks to return values, just like standard programming functions. While this is a universal concept in practice, used in all languages, Scratch offers no native way to demonstrate it to kids. When teaching, I find it incredibly limiting that I cannot show more advanced classes the possibilities with functions that return values.
Scratch is sadly for people who don't know how to code,… They try to keep it simple

Report [] ::custom cap

Sorry bud, you can only look at the block in the forums…

But if scratch would add this…. FULL SUPPORT

Last edited by CatPlusHouse (June 10, 2026 15:54:38)

Pixalperfect
Scratcher
500+ posts

My blocks - Added the ability to return values

PowPro1502 wrote:

(#14)
It is a dupe.
nope, as i already linked a similar post and according to an ST member:

LittleGreyCells wrote:

Leaving this open for discussion as it doesn't look like an exact dupe of the earlier linked suggestion.
ZippyZebraZoom85749
Scratcher
500+ posts

My blocks - Added the ability to return values

Pixalperfect wrote:

PowPro1502 wrote:

(#14)
It is a dupe.
nope, as i already linked a similar post and according to an ST member:

LittleGreyCells wrote:

Leaving this open for discussion as it doesn't look like an exact dupe of the earlier linked suggestion.
Pixalperfect
Scratcher
500+ posts

My blocks - Added the ability to return values

ZippyZebraZoom85749 wrote:

(#17)

LittleGreyCells wrote:

Leaving this open for discussion as it doesn't look like an exact dupe of the earlier linked suggestion.
i thought it was a dupe because both suggestions add custom reporters / booleans but i guess the implementation was different and that's why it isn't a dupe

Powered by DjangoBB