Bray thinks that the first program which should be documented in any programming language book is “Hello, world.” – and I agree with him.
I have several times felt a pang of “when I am going to be able to interact between the code I am writing and the person who is using that code?” when diving into some new programming language.
The Wikipedia article actually mentions Bray’s issue, without offering a stance:
There are variations in spirit, as well. Functional programming languages, like Lisp, ML, and Haskell, tend to substitute a factorial program for Hello World, as the former emphasizes recursive techniques, which are a big part of functional programming, while the latter emphasizes I/O, which violates the spirit of pure functional programming by producing side effects.
…and yep, I’m with you right there, I sympathise but for one little issue: if a computer solves a (factorial) problem, how shall we ever know until it also shares the result with us?
Leave a Reply