I asked Bob Bernecky "What's SAC?"
SAC is an interesting language, designed by Sven-Bodo Scholz
and others at the Christian-Albrechts Universitat in Kiel, Germany.
Scholz has just taken up a professorship in the UK, but here's
the SAC web site:
SAC started out as a purely functional subset of C, so that it
would easy for C programmers to use, then had these things
added to it:
- call-by-value (rather than call-by-reference), so
- multiple results (unlike C or APL) - WOW!
- Array extensions, taken from APL
- the WITH-loop: a FORALL loop of sorts, but
When Scholz got his WITH-loop-folding optimizations working,
he got superb performance (better than SISAL for most apps!),
but was disappointed to find that all the optimizations
stopped whenever they hit an APL-like array op (take,drop,
reshape, reverse, rotate, etc.).
So... here's the neat insight-- he rewrote the APL extensions
(except for the shape and rank primitives) as SAC defined
functions instead of library routine calls, and presto --
they were now exposed to the optimizations, so performance
was superb AND:
- if you don't like the definition of an APL-like
primitive, you can just modify the library routine
and make your own definition, with NO performance
- the language and the compiler become smaller and simpler!
It's quite neat, although I find the semantics somewhat oddball.