This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Counter point to the example

Posted by: Anonymous [ip: 168.182.39.249] on April 03, 2008 02:41 PM
The real problem with scheme isn't the construction of new programs but rather the legibility of new programs. The cpp boilerplate example above is the PERFECT example of why not to use scheme. If you consider a similar example in perl or python ( or ruby or php or JavaScript for that matter), it would be so much clearer to create the boilerplate as a single extended string (or here string) and then apply one or more regular expression substitutions to set the new class name as passed from the command line.

We end up with a program with an extended string for each document (header and source files), and a few lines each of which is a simple text substitution. Simple, intuitive and effective. In comparison, the scheme example above is far less clear and far more complicated.

#

Return to It's time to learn Scheme