[Aldor-l] Source documentation
Ralf Hemmecke
ralf at hemmecke.de
Sat Apr 25 05:28:35 EDT 2009
On 04/25/2009 01:20 AM, David Casperson wrote:
> Hi Pippijn,
>
> this is just from memory, but you can change from curly to piled any
> time that you encounter a
>
> #pile
>
> and that the two goals can nest in relatively arbitrary ways.
>
> Speaking solely from the point of view of someone writing tools, the
> piled text is a pain to parse.
Well, the Python people should have some experience with program layout
using something equivalent to #pile. So there must be a way to be able
to work nicely with #pile mode. ;-)
> ------------------------------------------------------------------------
> A related question: is piling important? Should its support be high
> priority? (Especially to you, Ralf.)
For me, #pile is definitely not important.
I have a dislike for pile mode because of code like the following from
the Axiom library...
1:UnivariatePuiseuxSeriesWithExponentialSingularity(R,FE,var,cen):_
2: Exports == Implementation where
3: R : Join(OrderedSet,RetractableTo Integer,_
4: LinearlyExplicitRingOver Integer,GcdDomain)
The indentation of line 2 is completely irrelevant because of the _ in
line 1. The same applies for line 2. But as far as I remember, there was
a rule that Axiom would automatically continue a line when a closing
parenthesis is missing. So the _ on line 3 would be unnnecessary.
(See page 888 of (Tim's version) of the Axiom book or
http://www.axiom-developer.org/axiom-website/hyperdoc/axbook/section-10.2.xhtml)
Does someone (unfamiliar with SPAD) really understand the following?
-----
The definition of drawRibbons consists of a pile of expressions to be
executed one after another. Each expression of the pile is indented at
the same level. Lines 4-7 designate one single expression: since lines
5-7 are indented with respect to the others, these lines are treated as
a continuation of line 4. Also since lines 5 and 7 have the same
indentation level, these lines designate a pile within the outer pile.
-----
How much do you like the following from
http://www.axiom-developer.org/axiom-website/hyperdoc/axbook/section-5.2.xhtml
---BEGIN
Blocks can be used in the arguments to functions. (Here h is
assigned 2.1+3.5.)
h := 2.1 +
1.0
3.5
---END
And how much do you like the next thing?
---BEGIN
Here the second argument to eval is x=z, where the value of z is
computed in the first line of the block starting on the second
line.
eval(x**2 - x*y**2,
z := %pi/2.0 - exp(4.1)
x = z
)
The interesting part is also the closing parenthesis. Could I write it
in column 1? Or column 6, so that it alligns with "x=z"?
Ralf
More information about the Aldor-l
mailing list