OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

xacml message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: Re: [xacml] RE: Your input needed on Comment#33. Forwarded messagefrom Daniel Engovatov.

The map function is polymorphic.

The type of the map function is deduced by the function parameter and the
other argument has to coincide.

The type of map is  ( ( a -> b ) -> [a] -> [b] ).

That is, map takes a function that transforms an element of one type to
another, a bag of the first type, and returns a bag of the resultant type.

What would "integer-map" mean? Would that mean a transformation of a bag
of integers to integers? Somehow, that would defeat the purpose of the
brevity of the specification, especially if you wanted to convert doubles
to integers, or dates to strings, etc.

If you want to define explicit map functions you would have to use the
cross product of types, i.e. *-*-map. You define an awful lot of
functions. Any good type checker can handle this. Also that would limit
the use of the function to just the primitive types. If you invent another
type, you have to define a new type-*-map and *-type-map functions, (at
least for every *type you you have transformation functions defined. That
would defeat the beauty of higher order functions, reducing the
specification by extracting common functionality.

As far as extension APIs. I whole heartily disagree with Daniel. I do care
about them. I dont have any problem in defining new types and applying the
higher order functions to any well defined function.  Maybe this is just
an implemenation issue.


On Fri, 22 Nov 2002, Anne Anderson wrote:

> ------- start of forwarded message -------
> From: Daniel Engovatov <dengovatov@crosslogix.com>
> To: "'Anne.Anderson@Sun.com'" <Anne.Anderson@sun.com>,
>    Daniel Engovatov
> 	 <dengovatov@crosslogix.com>,
>    Polar Humenn <polar@syr.edu>
> Subject: RE: Your input needed on Comment#33
> Date: Thu, 21 Nov 2002 14:59:55 -0800
> I would second this motion - I suggested it some time ago, but somehow it
> got lost.
> It is indeed redundant to some extend, but for consistency it should be done
> I believe.
> Now that we allow function to be a parameter, having a top level funciton of
> undefined type really complicates proper extension API design.   But nobody
> seems to care about extensions at this point.  Well, eventually you will,
> but it would be too late to fix it.
> -----Original Message-----
> From: Anne Anderson [mailto:Anne.Anderson@Sun.com]
> Sent: Thursday, November 21, 2002 2:57 PM
> To: Daniel Engovatov; Polar Humenn
> Cc: Anne Anderson
> Subject: Your input needed on Comment#33
> Daniel and Polar,
> We need your input on the following comment before we can resolve
> it.  Could you take a look and post something to the XACML TC
> mailing list ASAP?
> Thanks!
> Anne
> 0033.
> http://lists.oasis-open.org/archives/xacml-comment/200211/msg00061.html
> Subject: map function
> From: Seth Proctor <seth.proctor@sun.com>
> Date: Wed, 20 Nov 2002 16:22:32 -0500
> I'm a little concerned with the definition of the map
> function. Every other function and attribute in the spec has a
> well defined type associated with it, but the map function does
> not. Even things like the bag functions are defined as type-* so
> that each of the bag functions returns a well defined type (ie,
> there is a uniquely named function for each bag function that
> returns each attribute type). The map function, however, is
> simply defined as returning a bag of some type.
> For consistency, and to make sure that the strong typing present
> in the rest of the spec exists here too, I would suggest that the
> map function be redefined as type-map, such that there is a named
> map function for each type in the spec. I think the functionality
> being provided by map makes sense, I just think it should be
> clear what types of bags the map function returns.
> CATEGORY: Alternative.
> STATUS: Discussed 11/21/02.
> ACTIONS: Need opinions from Polar and Daniel.
> --
> Anne H. Anderson             Email: Anne.Anderson@Sun.COM
> Sun Microsystems Laboratories
> 1 Network Drive,UBUR02-311     Tel: 781/442-0928
> Burlington, MA 01803-0902 USA  Fax: 781/442-1692
> ------- end of forwarded message -------
> --
> Anne H. Anderson             Email: Anne.Anderson@Sun.COM
> Sun Microsystems Laboratories
> 1 Network Drive,UBUR02-311     Tel: 781/442-0928
> Burlington, MA 01803-0902 USA  Fax: 781/442-1692
> ----------------------------------------------------------------
> To subscribe or unsubscribe from this elist use the subscription
> manager: <http://lists.oasis-open.org/ob/adm.pl>

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC