by Refreeze5224 · 4mo ago · 0 comments
C does seem to sit at the perfect intersection of language age and low-level access to allow this kind of competition, whereas something like Go seems far less suited for it. Javascript is routinely obfuscated pretty well for human readers. I'm not familiar enough with Rust to say, but I bet with what little I know of its syntax you could create some pretty ugly stuff?
Personally, while I see the social advantages of having all code in one language be similarly structured and use the same idioms, I think a language is meant to be used, and it should offer all the building blocks for writing programs in whatever is the most natural way.
Zig could probably support a similar contest as it grows up.
Of the two^H^Hhree, I think that the first is what contributes most to the aesthetic appeal of obfuscated C. The only other languages I’ve used that are as good for making code that looks impenetrable are Forth and JavaScript, both of which share that feature.
(Probably any lisp, too, but for some reason I’ve never actually tried. I can say, though, that the most confusing codebase I ever inherited was written in Clojure.)
So yes, I’m inclined to agree that Rust can be a good language for writing deliberately ugly code, and Go not so much. But for a different, perhaps more trivial reason.
If any you can do the same weird tricks as obfuscated C but with 100% clean code.