[e-lang] Expanding guarded ignore pattern?

Kevin Reid kpreid at mac.com
Fri Dec 1 16:07:56 CST 2006


I'm implementing the guarded ignore pattern (epatt`_ :int`) in E-on- 
CL. What I thought of first was to implement it as a nonkernel  
pattern, but I see that current E-on-Java seems to implement it as a  
kernel pattern.

The possible expansions I've thought of are:

   sp__1 :int
   via (int.coerce) _
   via (fn s__1, e__1 { int.coerce(s__1, e__1) }) _

The only reason not to make it nonkernel I can think of is its effect  
on __getAllegedType -- the first expansion will introduce a spurious  
name into the alleged type, but the others will hide the guard.

On the other hand, I'd prefer not to introduce an optional guard into  
IgnorePattern and so complicate its semantics and implementation.

I'm tentatively calling the nonkernel node 'GuardTestPattern'.

What do you think?

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>




More information about the e-lang mailing list