Idea: swap with multiple arguments

Observer via Digitalmars-d digitalmars-d at puremagic.com
Tue May 24 13:16:44 PDT 2016


On Tuesday, 24 May 2016 at 08:56:31 UTC, Jonathan M Davis wrote:
> On Tuesday, May 24, 2016 02:40:24 Observer via Digitalmars-d 
> wrote:
>> If you don't see value in it, you've neglected to learn 
>> PostScript.
>
> I wasn't aware that postscript was a programming language. All 
> I know about it is that it's what printers talk (sometimes), 
> and I assumed that it was a protocol.

It is a full-fledged programming language, and quite nice for
manipulating graphic output to raster devices.  There was even
a Display PostScript version that targeted output to screens,
though Adobe eventually dropped support for it.  The PLRM book
(PostScript Language Reference Manual) I mentioned earlier is
the definitive description of the language.  There is also a
separate book, "Mathematical Illustrations:  A Manual of Geometry
and PostScript", by Bill Casselman, that describes how to use it
to draw 3D models.

Anyway, with respect to the current discussion, PostScript has a
rich and elegant set of operators, to handle stack operations,
math operations, array operations, dictionary (hash) operations,
string operations, control operations, file operations, graphics
operations (of course), and more.  It's definitely worth a look
for inspiration both when designing language features, and for
the clarity of its documentation (the PLRM).


More information about the Digitalmars-d mailing list