I'm Working on Implementing a Programming Language All My Own
Key topics
The creator of a new programming language is sparking debate with their unconventional choice of using a colon for assignment, arguing that the equal sign should be reserved for comparisons since that's its meaning in mathematics. Commenters are weighing in, with some agreeing that the equal sign is more about equality than assignment, while others point out that in math, "let x = 1" is a common notation, and that the equal sign is often used to define pure functions. The discussion highlights the tradeoffs involved in designing a programming language's syntax, with some arguing that the colon is a clear assignment operator, while others see it as confusing or unconventional. As the debate rages on, it becomes clear that there's no one "right" way to do it, and that the creator's choices will ultimately depend on their language's specific goals and philosophies.
Snapshot generated from the HN discussion
Discussion Activity
Active discussionFirst comment
2d
Peak period
19
60-66h
Avg / period
12.3
Based on 49 loaded comments
Key moments
- 01Story posted
Aug 27, 2025 at 12:24 PM EDT
4 months ago
Step 01 - 02First comment
Aug 29, 2025 at 9:07 PM EDT
2d after posting
Step 02 - 03Peak activity
19 comments in 60-66h
Hottest window of the conversation
Step 03 - 04Latest activity
Aug 30, 2025 at 2:24 PM EDT
4 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
-> for definition is just annoying. On every keyboard layout, it takes two strikes to type, possibly with shift involved.
Then again I quite like rewriting languages like Mathematica and lean
"let x = 1" has the same meaning in mathematics as well as JavaScript and Rust.
Instead of := you should use => for assignment.
This is touching on a pet peeve of mine: Mathematics and programming are similar in many aspects, but this is not one of them. In mathematics = is not a comparison, but a statement.
More generally, mathematics is about tautologies, that is statements that are always true. In programming, a comparison is evaluated to either true or false.
That doesn’t mean that there’s no room for conditionals in mathematics (one example is piecewise function definitions). But it’s not the same. Heck, even the definition of “function” is different between mathematics and programming.
As a new language design feature procedures could be assigned to references for reuse in the same way as calling a function by name/variable.
For example, in most languages you have a notation like f(g(h(x))) which calls the functions in the exact opposite order of reading which is unnecessarily confusing.
Personally, I think this argument only holds water for languages that are rooted in mathematics (e.g. Haskell, Lean, Rocq, F*, ...). If your computational model comes from a place of physical hardware, instructions, registers, memory etc. you're going to end up with something very different than an abstract machine based on lambda calculus. Both valid ways to design a PL.
(I find it baffling in the extreme that in many mainstream languages the convention is to write type annotations as “x: T”, both prima facie and because in those languages the notation then collides with field assignment!)
Historically, distinguishing an equality operator from an assignment one has existed for many decades. Whether using colon for the latter is "absolutely correct" is the subject of valid debate.
An equally compelling case could be made for any of the following assignment operators as well:
EtceteraNope, make it explicit. You're moving the value of an expression to a placeholder. The only sensible way to write that would be
Why, with such a simple and obvious English-like syntax even a common business-oriented person could use the language.It's one thing to read about them in books, but you learn so much nuance by actually stepping through the inherent problems and difficulties in actually making them work.
Modern tech is too advanced to meaningfully learn about it by tinkering with small toy projects. These "foundational technologies" are gigantic specializations that require an extraordinary investment of time to master.
Looking back now over the years, I wish I tinkered less and narrowed my focus more.
In any case, I doubt a run on sentence is “meaningless” but it is hard to parse.
Or Python, Go, or Typescript.
I recently sat down and put together the beginnings of a framework to play around with or use as a starting point.
https://github.com/codr7/shi
...where is the source code?
[0]: https://smallandnearlysilent.com/baba-yaga/LICENSE.txt
[0] https://github.com/pugjs/pug?tab=readme-ov-file#syntax