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.

Generalizing the += Operator with an "alt" Keyword in a Custom Programming Language

By

leontrolski

1mo ago· 2 min readenOpinion

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 pulled
I 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
Snippet from the RSS feed
2026-04-24

You might also wanna read