[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon May 16 07:31:46 2001 
Subject:Re: filenames, argument list separators + gsl extension 
From: 
Volume-ID:1010516.02 

In article <4q3td9.dc1.ln@electric-hedgehog>,
	hedgehog@electric-hedgehog.net (Chris Dollin) writes:
> In article <9dro4b$185v$1@soapbox.cs.bham.ac.uk>,
> 	Aaron.Sloman.XX@cs.bham.ac.uk 
        (Aaron Sloman See text for reply address) writes:
>> [To reply replace "Aaron.Sloman.XX" with "A.Sloman"]
>> 

(twin wrote)
 
> This is not a general solution, because the hole syntax is applicable to
> things that do not have a "relevant set of parentheses", such as
> 
>     x @consPair _
> 
> which is one way of writing the equivalent of
> 
>     procedure (y); conspair( x, y ) endprocedure

or using Aaron's syntax

    conspair(% x, ?1 %)

(aaron wrote)

>> Compare: which of these will mishap?
>> 
>>     last([^tl ^hd])(hd([[^tl]]))([3 4]) =>
>> 
>>     last([^tl ^sqrt])(hd([^hd]))([3 4]) =>
>> 
>>     last([^tl ^hd])(hd([[^sqrt]]))(3) =>
> 
> I don't see the parallel.

I think I do now.

You mean that just as some people would interpret F(A)(B) as F((A)(B)), not
(F(A))(B), because they think of the last thing being the argument,
and the *immediately* preceeding thing as being the F, they might
be confused trying to find the closest enclosing holey expression?

[How real is the example, by the way?]

That's possible. We'll have to see what happens. Incidentally, I've
always found these prefix application chains to be an invitation to
confusion and tedium, which is why I'm so chuffed about the infix-call
syntax I introduced in Pepper (and used heavily in Pop) and borrowed
into Spice, although the natural translation of the first ikk above:

    [3, 4] @([[tl]].hd @([tl hd].last))
    
turns out not to be significantly better.

I'll stop now before I realise I'm talking like a salesman.

-- 
Chris "Spice does have *semantic* benefits too ..." Dollin
C FAQs at: http://www.faqs.org/faqs/by-newsgroup/comp/comp.lang.c.html