Andreas' practical language comparison
Perhaps you already encountered the situation - you read a bit about some less-mainstreamed language,
and ask yourself : How in the world do they write an "hello world" with that?
This is where i want APLC to help. I want to collect implementations in various "languages", for a few
trivial algorithms (bubblesort etc) and applications.
I call it an practical language comparison. That said, the "languages" compared should be
actual language implementations, for actual platforms - rather "GCC 3.0.4 for Linux x86 using KDE 3.2"
than "C", rather "Turbo Pascal" than "Pascal". I'll call these implementations languages from now on.
The comparison currently available in the form of a matrix with language X test case (may become LARGE).
The test cases are defined by me. I do by far not know all languages, especially regarding the non-imperative ones.
Feel free to send in more test cases (together with an implementation in your favourite language), but please
accept that I can't add all, and that i may need some explanations on the mechanics...
New test cases should be made up and described similar to the existing ones.
If you want to supply implementations, please follow these rules:
- If possible, complete tests for already filed languages instead of creating new ones (e.g. do it in
GCC 3.0.4 instead of GCC 4.0 when GCC 3.0.4 is already listed). You don't actually have to use the
version already listed for compiling if you are absolutely sure that they are compatible in this aspect - just
drop me a note like "written and tested in GCC 4.0, but drop it in 3.0.4"
- You should restrict yourself to libaries included with the standard compiler distribution, or which are included in the
target OS. If additional libraries are neccessary (e.g. at least save hundreds of lines of code), please add these to
the language specifications, so this solution can be filed as a new language. ("GCC 3.0.4 with Allegro")
- Feel free to mail me "not possible without extra libaries" entries (for example graphics in dos batch scripts)
- No Pseudocode. Write real code, and test it.
- Leave out code automagically created by your toolkit, if possible. If your Java builder creates all the window handling
code when starting a new project, leave it out.
- For IDEs, write down your actions instead of code where appropriate ("Click new/new application, drop Label on Form,
change "Caption" property of label to "Hello world" "). The work needed to create the app is more interesting than the
code produced.
- Please format your code nicely, and add comments. Remember your code will be read by people who have no clue
about the programming paradigm of your favourite language.
- Don't use the most obscure notation your language offers. Prefer readable, maintainable code. This is no 'compact code contest'.
- If implementation details are not clear from test case descriptions, refer to existing examples in other languages.
- Please follow suggestions ("should be an console application") whenever possible, to improve comparability
- Your name and email will be displayed with your sources.
- By sending in sources, you guarantee that there are no copyright/patent issues regarding them. You have and will keep
the sole liability regarding any legal issues with those sources. You further confirm that those sources are
created by you, and may be freely used by other people.
- Feel free to write improvements (complete implementation source) of existing versions.
- Submissions go to mail at kochandreas.com
When introducing a new language to the list,please mention:
- Compiler name and version
- Target platform(s) and -version, if platform-specific.
- Additional Libaries
Last Update: 2004/10/03