Is Blockly a programming language?

261 views
Skip to first unread message

Mark Friedman

unread,
Mar 16, 2021, 1:51:14 PM3/16/21
to blo...@googlegroups.com
I feel a need to weigh-in here ;-)

I think that part of the answer depends on which parts of Blockly you're talking about.  There is a subset of Blockly that is only about defining the shapes and styles of blocks and that provides a UI surface for those blocks and an abstraction for writing code generators based on those blocks.  That subset is fairly clearly not a programming language.

However, Blockly also contains a set of pre-defined blocks and code generators and a mechanism for defining variables.  I would argue that that part of it is defining a programming language.  It's a programming language that is. or at least attempts to be, a fairly minimal language suitable for small programs that is learnble by people with little or no programming experience.

It is easy to conflate those two subsets of Blockly, and folks have been doing it from the very beginning of its existence.   I will say that the Blockly team has done an admirable job in its documentation of tryng to clarify the nature of Blockly, but people at different parts of the elephant think of it differently.

-Mark
 
On Tue, Mar 16, 2021 at 9:35 AM Neil Fraser <ro...@neil.fraser.name> wrote:
On Tue, 16 Mar 2021 at 09:25, Coda Highland <chig...@gmail.com> wrote:
I would argue that Blockly is indeed a programming language, but it is not an interpreter. (It's a transpiler.) 

While most applications that use Blockly do define a programming language, Blockly itself doesn't define any particular language.  It's up to the end applications to create the blocks and determine what to do with them.  An extreme example is this application that doesn't define anything that could be considered a programming language:

-Mark

Neil Fraser

unread,
Mar 16, 2021, 2:28:13 PM3/16/21
to blo...@googlegroups.com
Side note, "is Blockly a programming language" is a historically raw nerve for us.  When Blockly first launched eight years ago, someone very senior found out about it through a news story that stated that Google had just created a new language.  At the time a slew of other Google programming languages had just been released, and a moratorium had been declared on the development of new languages.  So there was some heat that we'd apparently ignored this directive (which we were unaware of).  We did an emergency rewrite of all public documents to remove the word 'language', and worked to convince everyone that Blockly was a library and an editor, not a language.  Things cooled down, and Blockly was allowed to continue.

Fortunately, this wasn't just linguistic tap-dancing.  Although Blockly does provide some sample blocks which do define a de facto language, they are just samples.  Any languages created by Blockly are defined by application developers.  Scratch is a language, App Inventor is a language, Blockly is just a library.

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/CAOk7GcS5Kq9N85ian%3D5UPrTyx3jfaUrTmRUZUw5CEKX_X66w_w%40mail.gmail.com.


--

Coda Highland

unread,
Mar 16, 2021, 2:41:42 PM3/16/21
to blo...@googlegroups.com
That's a fair point. Blockly isn't really a language any more than, say, yacc is a language. It's a tool for building DSLs.

/s/ Adam

Mark Friedman

unread,
Mar 16, 2021, 3:31:50 PM3/16/21
to blo...@googlegroups.com
I'm going to push back a bit here.  I think that the way that Blockly is currently organized tends to blur the distinction that you are trying to make.  For example, the provided code generators are in the same repo as the rest of Blockly with no particular name that might suggest that they are samples (unlike, say with the blockly-samples GitHub repo). At a somewhat deeper level, the implementation of procedures and variables is defined in Blockly's core.  I would argue that those choices lead to a particular kind of language semantics (e.g. global untyped variables and static procedure definitions).  Now, of course you can ignore all of the above and implement a very different kind of language, and many people have, but it's significantly more difficult.

None of this is meant to diminish the accomplishments of the Blockly project or its team.  The potential use-cases for Blockly are large and varied and it is hard to define (and document) the right abstractions right off the bat.  It takes time and refinement and the team has been doing that over the years. I will also note that the relatively recent incorporation of plugins into Blockly suggests that perhaps the "sample" languages could really be refactored out of the main repository.  That might help with the confusion.

-Mark


feni...@google.com

unread,
Mar 16, 2021, 5:13:34 PM3/16/21
to Blockly
> I will also note that the relatively recent incorporation of plugins into Blockly suggests that perhaps the "sample" languages could really be refactored out of the main repository.  That might help with the confusion.

Good eye. Yes, plugins mean that we will be able to extract blocks and generators from the rest of core, and hopefully turn them into their own plugins.
Reply all
Reply to author
Forward
0 new messages