Generalizing the += Operator with an "alt" Keyword in a Custom Programming Language
By
leontrolski
Right out the toaster. Reliable, with some real depth.
Summary
The author discusses a "quarter baked" programming language they've been working on, and presents a syntax idea for generalizing the assignment-plus-operator pattern (like +=) using a keyword "alt" instead of special symbols. The idea allows `alt x + 1` to be equivalent to `x = x + 1`, and extends to all infix operators. The post is a brief, informal exploration of a programming language design concept.
Key quotes
· 3 pulledI have a quarter baked language I've been working on. It's mostly crap, but a syntax idea fell out that I think is pretty neat.
Reassigning is cool as it's lexically scoped so easy to reason about (mutation is bad as it isn't).
The new idea is that instead of special symbols (in this case +=) we generalise with a keyword (alt) that affects all infix operators
You might also wanna read
Inside the lone lisp heap: A technical deep dive into a dynamic language's memory architecture
This article discusses the heap implementation of "lone lisp," a dynamic programming language. It describes how lone started as a collection
rlisp: A LISP Syntax Frontend That Compiles Directly to Rust
rlisp is a transparent s-expression frontend that compiles directly to Rust, allowing developers to write Rust semantics (ownership, borrowi
Designing Roto: Implementing Optional Semicolons in a New Scripting Language
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 semi
Han: A Compiled Programming Language with Korean Keywords Written in Rust
Han is a compiled programming language written in Rust that uses Korean keywords and Hangul script. It's presented as an experiment explorin
GlyphLang: A programming language optimized for AI code generation to reduce token usage
A developer created GlyphLang, a programming language designed specifically for AI code generation rather than human readability. The langua

Exploring the Concept of Inverse Parentheses in Programming Language Design
The article explores the concept of 'inverse parentheses' in programming languages - the idea of using parentheses to ungroup operands rathe
kellett.im·5mo ago