我构建了一个没有符号的编程语言,最难的部分是"和"

2026年8月2日2 次浏览来源:Dev.to阅读原文

正文保留英文原文(机翻易破坏代码与排版),标题/摘要已提供中文

I'm Spanish, and I kept watching people around me try to learn programming and give up.

Not because loops are hard, but because they were learning two things at once: the concept, and what even means.

So I built Fal.

All words, in Spanish, no symbols at all.

It runs in the browser if you want to poke at it: https://nissanboss.github.io/Fal/ Two things I didn't see coming.

The word "and" nearly broke it In Fal, (and) is both the logical AND and the argument separator: So was reserved and you couldn't name a variable .

Annoying the moment you want coordinates.

I assumed it was unfixable and moved on.

Then the author of EsJS turned up in a thread and said context should decide it, not a reserved word list.

He was right, and the fix was embarrassing: as a keyword is always infix, it always comes after something.

As a name it's always where a value goes.

The parser already knew which one it was looking at.

Exact decimals were a footnote that became the main feature A number is an int64 while it fits, an exact rational once decimals show up, and only falls back to float when there's no exact answer.

Looks like a party trick.

Then I wrote an example that sums 23 expenses from a CSV: Fal gives 1546.19 and the categories reconcile to the cent.

The same sums in float give 1546.1900000000005, which doesn't reconcile with its own parts.

Decimal and BigDecimal exist everywhere, I know.

The difference is that a kid adding two prices doesn't have to know they exist.

What it isn't Nobody's shipping production software in this.

Tree-walking interpreter, about 8x slower than Python, no package ecosystem.

It's a ramp.

If someone gets what a loop is here and then moves to Python, that was the point.

Go, ~5800 lines, no dependencies.

Source: https://github.com/NissanBoss/Fal If you think the fix has a hole in it, I'd like to hear it.

分享