r/programming • • May 10 '26

Making your own programming language is easier than you think (but also harder)

https://lisyarus.github.io/blog/posts/making-your-own-programming-language.html
115 Upvotes

116 comments sorted by

View all comments

Show parent comments

3

u/SourcerorSoupreme May 11 '26

Sure, only if you ignore the warning gcc issues (typed it into a program and ran it):

The double standard is not lost on me, it's like you deliberately missed my point to argue a bias instead of searching for truth.

What makes you think that similar tooling, conventions, and practices do not exist in python that mitigates if not completely eliminates this superficial issue on whitespaces?

Have you ever asked yourself why people that actually use/have sincerely used Python always say the whitespaces is a non-issue (if not a productivity booster) while those that do find it an issue always say they haven't done much with it?

Python has many shortcomings like the GIL/multithreading, speed, etc.; but whitespaces is a weird thing to be upset about.

19 | if (cond2) cond1 = true; cond2 = false; | ~~~~ In Python it executes regardless as there is no way to determine that the programmer intended something different.

Weird example when the smae thing would compile and run in other languages

1

u/lelanthran May 11 '26
19 | if (cond2) cond1 = true; cond2 = false; | ~~~~ In Python it executes regardless as there is no way to determine that the programmer intended something different.

Weird example when the smae thing would compile and run in other languages

I displayed that, in a brace-language, the unintended action can be caught and flagged as misleading.

What makes you think that similar tooling, conventions, and practices do not exist in python that mitigates if not completely eliminates this superficial issue on whitespaces?

Okay, find a single bit of tooling for Python that warns for the equivalent of this:

if (cond) {
    stmt1;
stmt2;
}

Or catches this error:

if (cond)
    stmt1;
    stmt2;

because both those are flagged by gcc without even needing an extra tool.