Discuss Scratch

ChickenChaosCreator
Scratcher
57 posts

Dual-Mode Editor: Switching Between Blocks and Text (Python-style)

I suggest adding a “Text Mode” toggle to the editor. This would allow users to switch their scripts between the standard blocks and a text-based language like Python.
How it would work:
The Toggle: A button at the top of the Editor to “Switch to Text.”
Two-Way Sync: If you drag a block, the code updates. If you type code, the blocks update. This is similar to how “Blockly” or other educational tools function.
Scratch-Specific Syntax: The text would use simple commands like sprite.move(10) or sprite.say(“Hello!”).
Why this is a good idea:
Bridge to Professional Coding: It helps users transition from blocks to text-based languages like Python or JavaScript without leaving the Scratch community.
Efficiency: Advanced users can often type logic faster than they can drag and drop blocks.
Accessibility: Text-based code can be easier for screen readers to process, helping more people use Scratch.
Addressing Potential Concerns:
Complexity: The text mode would be optional. Beginners can stay in the block editor as long as they want.
Errors: If a user types something the blocks don't understand, the editor could highlight the line in red and prevent switching back to blocks until the Syntax Error is fixed.
lfg30700
Scratcher
1000+ posts

Dual-Mode Editor: Switching Between Blocks and Text (Python-style)

This appears to be rejected(as per the official list):

The Official List Of Rejected Suggestions wrote:

2.2 Text-based syntax in Scratch
Some users wish to code Scratch not with the blocks, but with typing code instead (similar to how more advanced programming languages work). Others are interested in an option to view, convert, or download Scratch code to other programming languages. However, the Scratch Team has discussed this possibility multiple times and has decided every time that it would not be beneficial for beginners or teachers.

This extends to coding, viewing, converting, or downloading Scratch in any text-based language, including BBCode, Javascript, some form of pseudocode, or some other programming language. If you wish to code using another language, then you can learn it on your own, but it would have to be done outside of Scratch. For those who are interested, it may be worth checking out Tosh. It is a text-based programming language that serves as a text editor for Scratch projects. Another option is MakeCode Arcade, a programming language that can convert between block-based and text-based programming within the editor. Advanced programmers can use Leopard to make Scratch projects directly using JavaScript.

Powered by DjangoBB