We all love to poke fun at different programming languages, this repo serves as a collection of "questionable" constructs collected over a long period of time. Feel free to use for any and all unholy purposes.
If something does not work as expected, please report a bug. The point is to reflect the current state of affairs, not document which silly code used to work with GCC 10 years ago.
Contributions are welcome from any mainstream programming language! Just make sure they are concise and can be run quickly and easily, and have just enough comments for the reader to follow what is going on. Naturally, examples of "this should not compile!" should not include justification as to why the thing compiles, as to not spoil the fun. Contributions in esoteric languages are not welcome, the point is to show the kind of code one might see in production, not code golf.
Specimen from the following languages are highly desired:
- Rust (honorable mention goes https://github.com/rust-lang/rust/blob/master/tests/ui/weird-exprs.rs)
- Zig
- Odin
- C#