All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Designing Roto: Implementing Optional Semicolons in a New Scripting Language

By

karakoram

2mo ago· 25 min readenInsight

Summary

The article discusses the author's development of a new scripting language called Roto, which aims to be easy to use and read by making semicolons optional for statement termination. The author explores the technical challenges of implementing automatic semicolon insertion, using Rust as an example to illustrate how programming languages handle statement boundaries without explicit terminators. The content delves into parsing techniques, language design decisions, and the trade-offs involved in creating a language that balances readability with unambiguous syntax.

Key quotes

· 5 pulled
I'm making a scripting language called Roto. Like so many programming languages before it, it has the goal of being easy to use and read.
Many languages end up making semicolons to delimit or terminate statements optional to that end. I want that too!
This sounds simple, but how do they implement that? How do they decide where a statement ends without an explicit terminator?
To illustrate the problem, we can take an expression and format it a bit weirdly. We can start with an example in Rust:
In Rust, that is perfectly unambiguous...
Snippet from the RSS feed
I'm making a scripting language called Roto. Like so many programming languages before it, it has the goal of being easy to use and read. Many languages end up making semicolons to delimit or terminate statements optional to that end. I want that too!

You might also wanna read