Your boss asks you to write a "hello world" program. Since you get paid for lines of code, you want to make it as complex as possible. However if you just add nonsense lines, or obviously useless or obfuscating stuff, you will never get it through code review. Therefore the challenge is:
Write a "hello world" program which is as complex as possible under the condition that you can give a "justification" for every complexity in the code.
The required behavior of the program is to just output a single line "Hello world" (without the quotes, but with a newline at the end) and then exit successfully.
"Justifications" include:
- buzzword compatibility ("Modern software is object oriented!")
- generally accepted good programming practices ("Everyone knows that you should separate model and view")
- maintainability ("If we do it this way, we can more easily do XXX later")
- and of course any other justification you can imagine using (in other situations) for real code.
Obviously silly justifications will not be accepted.
Also, you have to "justify" your choice of language (so if you choose an inherently verbose language, you'll have to justify why it is the "right" choice). Fun languages like Unlambda or Intercal are not acceptable (unless you can give a very good justification for using them).
The score of qualifying entries is computed as follows:
- 1 point for each statement (or whatever the equivalent to a statement is in your language of choice).
- 1 point for each definition of a function, type, variable etc (with the exception of the main function, where applicable).
- 1 point for each module use statement, file include directive, namespace using statement or similar.
- 1 point for each source file.
- 1 point for each necessary forward declaration (if you could get rid of it by rearranging code, you have to "justify" why the arrangement you've chosen is the "right" one).
- 1 point for each control structure (if, while, for, etc.)
Remember that you have to "justify" each single line.
If the chosen language is different enough that this scheme cannot be applied (and you can give a good "justification" for its use), please suggest a scoring method which most closely resembles the above for your language of choice.
Contestants are asked to calculate the score of their entry and write it in the answer.