Is DSSSL Syntax Tricky?

Subject: Is DSSSL Syntax Tricky?
From: Paul Prescod <papresco@xxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 May 1997 11:42:55 -0400
After thinking about it a little bit, I'm going to argue that the DSSSL
syntax *is* a bit tricky (not out and out hard, but tricky) and is a
disincentive for those who would make small-to-medium complexity DSSSL
stylesheets without really learning the full DSSSL expression language.

#1. That powerful "for" operator that I demonstrated is kind of "buried"
in the syntax as two seemingly innocuous functions (apply and map). The
Scheme versions of those functions require you to understand higher
order functions, anonymous functions and the "lambda" keyword. Although
I understood those functions before I started using DSSSL, I was caught
up in the "little Schemer religion" and so coded everything as recursion
when map has the recursion built-in and hidden. I would be curious to
know about other people's experiences with "map" and "apply". Do you use
them? Do you sometimes use recursion where they would be more
appropriate? Note how my alternate syntax hides the use of higher-order

#2. New learners cannot use the techniques that they have learned
elsewhere for "scanning" code. You can be trained in hundreds of infix
languages and 

(if a b c) 

would be totally inscrutable compared to 

if( a ) {b} else {c}; 

This *does* slow you down in learning the language because it slows you
in learning from other people's code. Also, I presume that I am not the
only person who tries to look at a few examples of another language's
code before I learn it, to see if it has the features I am interested
in. If I can't even figure out the "if/then/else," "let" and "function"
then that is a disincentive. The Scheme syntax for all three of these
constructs is needlessly complex (or over-simple?) in my opinion.

#3. You must be trained in prefix. If you already know infix, this is
Just One More Thing To Learn. Not a hard thing, but another thing. 

#4. It is hard to see what is code and what is data. Someone who was
trying to learn DSSSL complained about this on comp.text.sgml just a few
months ago. Look at these two declarations with "new" eyes:

(define a 5)
(define (a) 5)

now compare them with other languages:

define a = 5;

function a(){

Once again this comes down to scanning and persual by newbies, not long
term difficulty in learning the language.

 Paul Prescod

 DSSSList info and archive:

Current Thread