This is a fragment from PLEAC – Programming Language Examples Alike Cookbook, a great resource if you are curious about comparing a set of sample programs in various programming languages. It is incomplete (various languages have different % completion of common programs). Towards the end of this site, I picked this list of interesting projects.
These are interesting projects on the same topic (thanks to Pixel):
- The Great Computer Language Shootout
- rot13 in different languages (string manipulation)
- Quine (self-reproducing code)
- The “Hello, World” Page
- The 99 Bottles of Beer problem
- OO example code
- OO shape examples
- Ryan Davis’s Ruby Cookbook, a strangely named “collaborative work” since main author is holding the copyright and all rights are reserved
- ActiveState and O’Reilly’s Python Cookbook
- ActiveState’s Tcl Cookbook
- Michael Neumann’s examples of programming languages
- Pixel’s Syntax Across Languages
- Pixel’s scriptometer
- The Common Lisp Cookbook
- A sort of Scheme Cookbook
- A sort of Andreas’ practical language comparison
- The Perl/Python Phrase-Book