On Sun, 2006-09-03 at 19:37 -0400, Peter Tanski wrote:
> On Sep 3, 2006, at 4:53 AM, skaller wrote:

> // this mess is due largely to List
> val flxPty:Company =
>       C (Cons ((D ("R&D", skaller,
>       (Cons ((PU tryzelaar),
>       Cons ((PU percossi),
>       Cons ((PU tanski),
>       Empty[SubUnit]) ))))), Empty[Dept]));

This is better .. but doesn't port to pattern matching:

val flxPty:Company =

        C $ 
          Empty [Dept] +
          D $ "R&D", skaller,
          (
            Empty[SubUnit] +
            PU tryzelaar +
            PU percossi  +
            PU tanski
          )
;

and due to overload of +, allowing either elt + list[elt]
or list[elt] + elt to support pre-pending or appending
(appending of course is very slow).

There is an even better form:

        list(a,b,c)

which converts an array to a list. All of these are
potentially inefficient because they're executable,
and there is no 'invariant code motion optimisation' which might
lift them out of a loop or recursion.
        

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to