On side effects

Subject: On side effects
From: Roland Orre <orre@xxxxxxxxxxx>
Date: Tue, 17 Jun 1997 16:13:12 +0200 (MET DST)
Now I've succeded in using DSSSL (jade) for formatting SGML-documents
after a lot of trial and error and thanks to the two good tutorial examples
provided by Paul Prescod and Daniel M. Germán.

As I have been using scheme for several years for both research and production
I think that this is the right way to handle formatting of output. It is
much more flexible than e.g. LaTeX (which I normally use) as it can treat
the whole document as a database. You can present those things that
you want in any order.

The fundamental good thing with DSSSL is that it is based on a pure
REAL full programming language and not in one of all these very limited
special languages where it may be hard to express things.

There is however one thing that makes me suspicious and that is the side
effect freeness of DSSSL. My experience is that for a real working programming
language you want and need side effects. Being free from side effects makes
the languange hard to use in an application although it forces a good 
programming style. Maybe I am wrong and there may be several good reasons
for this side effect freeness. 

In may case I had just one simple selection variable telling which language
flow to use in the printed output with a variable *language* being set to
'swedish or 'english. In this case I had to use two different DSSSL-scripts
where this variable was defined to one or the other.

In another case you may want to use a lot more switches and selection
criterias. Anyway, if side effects like file-handling and "set!" was
allowed then it would be rather easy to write some kind of user interface
for different applications to adjust things, like a tcl/tk -script or
something in Java using e.g. pipe/socket I/O to communicate with dsssl.

Comments suggestions?

	Best regards
	Roland

OK. It is not completely free from side effects as it actually produces
an output.

 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread