A plea for original examples

Language designers: when you write sample programs to show off your language, please don't clone existing programs. Clones demonstrate that your language can do the same things other languages can do, but so what? The world doesn't need more programs whose only virtue is the language they're implemented in. We already have Tetris and Minesweeper and a zillion web servers. The world especially doesn't need more implementations of Emacs. Yes, it could have a better extension language, but Emacs' strength is the corpus of elisp that people have written, and your clone will not have that. So don't waste your time.

Instead, go directly to the good stuff. Think of how often you have cool ideas that you'd like to implement, but don't because you think it's too difficult. Make these your example programs, and judge your language on its ability to make them easy. That's what it's for, right?

As a language designer and as a programmer, your hope of notoriety rests on creating something new, something that isn't already available. It's easy to follow someone else's example, but the result will not inspire anyone else. There is no language-promotion tool like a killer application. Try to write one.

2 comments:

  1. I agree. But _also_ include some of the standard examples. Because if I'm glancing through your language's documentation and all I see are some quirky examples that show off the language's special strengths, I'll get suspicious that this is ALL it can do, and that it must be a lousy general-purpose language.

    ReplyDelete
  2. Sure, the small examples in documentation needn't be original. The ones that bother me are the larger programs written to test a language and show what it can do. If these are just inferior implementations of well-known programs, it's unlikely anyone will find them interesting enough to benefit from them as examples. (Not to mention it's a bit of a waste of effort.)

    As for showing general capabilities, I don't think this is terribly sensitive to what problem you solve. Any substantial program will use a wide enough variety of features to help show the language's versatility.

    ReplyDelete

It's OK to comment on old posts.