←back to thread

517 points petercooper | 3 comments | | HN request time: 0.605s | source
Show context
marcofiset ◴[] No.8558994[source]
I honestly think this is ridiculous. Sure, this is an incredible feat, and congrats. But serioulsy, I would be ashamed to publish such unreadable code under my name.

What about naming your variables with descriptive names?

What about extracting complex conditions into well named function to understand what is going on (thus defeating the purpose of the "4 functions") ?

This list could go on forever...

Writing software is not a contest for who can write the most amount of code in the most cryptic way.

replies(12): >>8558999 #>>8559001 #>>8559009 #>>8559056 #>>8559071 #>>8559139 #>>8559196 #>>8559249 #>>8559421 #>>8560270 #>>8560608 #>>8561021 #
1. mturmon ◴[] No.8559056[source]
> This list could go on forever...

Yes it could. While you are adding to your list of coding rules, the OP will have written another fun, tiny compiler.

Who is having more fun?

replies(1): >>8559104 #
2. marcofiset ◴[] No.8559104[source]
Those are not rules, they are mostly common sense to help the next programmer who has to maintain your code.
replies(1): >>8559141 #
3. afandian ◴[] No.8559141[source]
And most common sense of all is that you choose your rules for the audience. This is obviously not production code.

In any case if someone were competent enough to work on it then the style is actually quite readable. It's even full of comments.