Do Scratch broadcasts really support modularity?

My answer NO - not in practice. They confuse things and make modularity harder to teach.

I am very confused. As a primary school educator (and ex developer with a CS background) I have found that using broadcast develops poor programming habits, confuse me - other teachers and pupils
There seem to be many conflated concepts here

  1. Managing concurrency / Co-ordinating action through message passing - Communicating between objects / or whatever you want to call them depending on your paradigm.
  2. Functional decomposition (modularity) (procedures) again what ever you want to call them.

What is significant is - where is the flow of control - and how do your co-ordinate this with two very different programming constructs.

The lack of early functions (procedures/objects) or again whatever you want to call them - as implemented in Scratch was an awful situation (in my opinion). As teachers and students became very confused with a construct that could initiate multiple new threads but did not return control to the "calling" thread vs modularity... which is so different. I find it hard to write using the proper technical terms.

A huge swathe of resources were created which teach a whole host of misconceptions in this area and which are now "fixed" as "truth" in the teaching community and are hard to overcome now .

There is a paper which I thought gave the background of the design decision to not include functions - because of early student difficulty in understanding the difference between the two constructs http://web.media.mit.edu/~jmaloney/papers/ScratchLangAndEnvironment.pdf

See See 3.4 Inter-Sprite Communications and Sharing
and
3.5 Procedures
" Early versions of Scratch had a mechanism for creating procedures. In early
field tests, however, many users were confused by procedures since they seemed
very similar to broadcasts—both involved associating a name with a collection
of commands. In the interest of simplicity and minimalism, procedures were
removed from the language before Scratch was officially released, and Scratch
has gotten along surprising well without them.
Yet procedural abstraction is one of the “powerful ideas” of computer
science and procedures have practical value as a way to structure code as
projects grow. The Scratch team is considering reintroducing procedures as
a way for users to define their own command blocks. Other researchers have
been developing a variant of Scratch that supports not only procedures but
first-class functions, closures, and a complete functional programming system
[Harvey and Monig 2010]"

THANK GOODNESS they put them back in. I just wish they had not simplified ... and had made procedures HIGH profile in the first place.

This is all my own view :wink: