Re: [functor] Change default arity of Function, Predicate and Procedure

2013-05-14 Thread Bruno P. Kinoshita
http://kinoshita.eti.br http://tupilabs.com --- Em sex, 15/2/13, Bruno P. Kinoshita escreveu: > De: Bruno P. Kinoshita > Assunto: Re: [functor] Change default arity of Function, Predicate and > Procedure > Para: "Commons Developers List" , > "gudnabr...@gmail.com"

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-15 Thread Bruno P. Kinoshita
rs List > Sent: Friday, February 15, 2013 3:16 PM > Subject: Re: [functor] Change default arity of Function, Predicate and > Procedure > > On Fri, Feb 15, 2013 at 11:12 AM, Bruno P. Kinoshita > wrote: > >> Hi Matt, >> >> Thanks for the pointer, I forgot i

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-15 Thread Matt Benson
onal programming languages :) > > Bruno P. Kinoshita > http://kinoshita.eti.br > http://tupilabs.com > > > >________________ > > From: Matt Benson > >To: Commons Developers List ; Bruno P. Kinoshita > > >Sent: Friday, February 15, 2013

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-15 Thread Bruno P. Kinoshita
gt;> Thank you in advance! >> >> ps: in Java 8, the @FunctionalInterface does not guarantee the arity of >> classes, but raises compile time errors if you define an invalid functional >> interface (like one interface with two abstract public methods). This >> appl

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-15 Thread Matt Benson
onalInterface and used with lambdas :) > > Bruno P. Kinoshita > http://kinoshita.eti.br > http://tupilabs.com > > > >________________ > > From: Benedikt Ritter > >To: Commons Developers List > >Sent: Friday, February 15, 2013 6:54 AM > >

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-15 Thread Bruno P. Kinoshita
t;Sent: Friday, February 15, 2013 6:54 AM >Subject: Re: [functor] Change default arity of Function, Predicate and >Procedure > >2013/2/14 Oliver Heger > >> Am 14.02.2013 16:51, schrieb Matt Benson: >> >>  I would say that certainly one would often want to create a

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-15 Thread Benedikt Ritter
2013/2/14 Oliver Heger > Am 14.02.2013 16:51, schrieb Matt Benson: > > I would say that certainly one would often want to create an API like >> you've described. What I am reluctant not to support is: >> >> class Foo { >>static void add(Argumented> CharSequence>> functor); >> } >> >> Foo.ad

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-14 Thread Oliver Heger
Am 14.02.2013 16:51, schrieb Matt Benson: I would say that certainly one would often want to create an API like you've described. What I am reluctant not to support is: class Foo { static void add(Argumented> functor); } Foo.add(new BinaryFunction() {}); Foo.add(new BinaryProcedure() {}); F

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-14 Thread Matt Benson
I would say that certainly one would often want to create an API like you've described. What I am reluctant not to support is: class Foo { static void add(Argumented> functor); } Foo.add(new BinaryFunction() {}); Foo.add(new BinaryProcedure() {}); Foo.add(new BinaryPredicate() {}); The argume

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-14 Thread Jörg Schaible
Hi Matt, Matt Benson wrote: > Once again, an enum wouldn't readily be able to contribute to your > functor's being able to participate in some method by type signature; > i.e., I want to support the use case of: > > add(Argumented somethingThatTakesTwoArguments); > > Maybe this isn't a worthwhi

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-14 Thread Matt Benson
Once again, an enum wouldn't readily be able to contribute to your functor's being able to participate in some method by type signature; i.e., I want to support the use case of: add(Argumented somethingThatTakesTwoArguments); Maybe this isn't a worthwhile goal, but so far I don't see anything els

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-14 Thread sebb
On 14 February 2013 09:13, Jörg Schaible wrote: > Benedikt Ritter wrote: > >> Hi Matt, >> >> >> 2013/2/13 Matt Benson >> >>> TBH, I can't recall what the argument was against "Functor" either; I >>> think it had something to do with potentially confusing users of other >>> libraries? >>> >>> Func

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-14 Thread Jörg Schaible
Benedikt Ritter wrote: > Hi Matt, > > > 2013/2/13 Matt Benson > >> TBH, I can't recall what the argument was against "Functor" either; I >> think it had something to do with potentially confusing users of other >> libraries? >> >> Functor >> |_NullaryFunctor >> |_UnaryFunctor >> |_BinaryFuncto

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-14 Thread Benedikt Ritter
Hi Jörg, I like the simplicity annotations can provide. As Matt has pointed out Annotations do not define types, which makes it hard to let the compiler do the validation of the code. We could implement a custom annotation post processor. But that would require additional setup for users. Benedik

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-14 Thread Benedikt Ritter
d name. > > > > Again: If it practical to just call it Arity, then you should go ahead > > (pragmatism wins over oo purism ;-) > > > > Benedikt > > > > > > > > > > Thanks!! > > > > > > [1] http://en.wikibooks.org/wiki/Hask

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-13 Thread Matt Benson
Hi Jorg, We had at some point talked about whether these could be done with a simple annotation. I had hoped for something that could be expressed in terms enforceable by the compiler. Matt On Wed, Feb 13, 2013 at 10:22 AM, Jörg Schaible wrote: > Hi, > > Matt Benson wrote: > > > TBH, I can'

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-13 Thread Jörg Schaible
Hi, Matt Benson wrote: > TBH, I can't recall what the argument was against "Functor" either; I > think it had something to do with potentially confusing users of other > libraries? > > Functor > |_NullaryFunctor > |_UnaryFunctor > |_BinaryFunctor > > *is* the current state. :) Now, when I wok

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-13 Thread Matt Benson
gt; > >> > > > > >> > > Thanks! > > >> > > > > >> > > Bruno P. Kinoshita > > >> > > http://kinoshita.eti.br > > >> > > http://tupilabs.com > > >> > > > > >> &

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-13 Thread Benedikt Ritter
rs > [2] > http://download.java.net/lambda/b76/docs/api/java/util/function/BinaryOperator.html > > Bruno P. Kinoshita > http://kinoshita.eti.br > http://tupilabs.com > > > - Original Message - > > From: Benedikt Ritter > > To: Commons Developers Lis

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-12 Thread Matt Benson
om: Matt Benson > > To: Commons Developers List > > Cc: > > Sent: Monday, February 11, 2013 8:39 PM > > Subject: Re: [functor] Change default arity of Function, Predicate and > Procedure > > > > Hi Bruno, > > No objections here about the Arity interfaces. I

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-12 Thread Bruno P. Kinoshita
http://tupilabs.com - Original Message - > From: Matt Benson > To: Commons Developers List > Cc: > Sent: Monday, February 11, 2013 8:39 PM > Subject: Re: [functor] Change default arity of Function, Predicate and > Procedure > > Hi Bruno, >   No objections

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-12 Thread Bruno P. Kinoshita
; > > > Personally I am satisfied to align with lambda/guava if > noone else >> > > objects. >> > > > >> > > > Thanks, >> > > > Matt >> > > > >> > > > >> > > > On Mon, Feb 11, 2013 at 4:25 PM, Br

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-12 Thread Benedikt Ritter
1] https://github.com/kinow/functor > > > >> [2] https://github.com/kinow/functor/commits/master > > > >> > > > >> Bruno P. Kinoshita > > > >> http://kinoshita.eti.br > > > >> http://tupilabs.com > > > >

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-12 Thread Matt Benson
2 cents :) > Benedikt > > > > 2013/2/11 Bruno P. Kinoshita > > > Hi Matt! > > > > Great! I'll commit these changes tomorrow if there are no objections. > > > > Thanks! > > > > Bruno P. Kinoshita > > http://kinoshita.eti.br > > h

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-12 Thread Benedikt Ritter
--- Original Message - > > From: Matt Benson > > To: Commons Developers List > > Cc: > > Sent: Monday, February 11, 2013 8:39 PM > > Subject: Re: [functor] Change default arity of Function, Predicate and > Procedure > > > > Hi Bruno, > > No obje

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-11 Thread Bruno P. Kinoshita
8:39 PM > Subject: Re: [functor] Change default arity of Function, Predicate and > Procedure > > Hi Bruno, >   No objections here about the Arity interfaces.  I see that your master > branch also contains changes to migrate Unary* to * and * to Nullary*. > Personally I am satisfi

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-11 Thread Matt Benson
s/master > > Bruno P. Kinoshita > http://kinoshita.eti.br > http://tupilabs.com > > > > > > From: Bruno P. Kinoshita > >To: Commons Developers List ; " > gudnabr...@gmail.com" > >Sent: Wednesday, January 30, 201

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-02-11 Thread Bruno P. Kinoshita
__ > From: Bruno P. Kinoshita >To: Commons Developers List ; "gudnabr...@gmail.com" > >Sent: Wednesday, January 30, 2013 3:58 PM >Subject: Re: [functor] Change default arity of Function, Predicate and >Procedure > >I think it makes sense and is clear what is do

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-01-30 Thread Bruno P. Kinoshita
x27;t > find them >> in java.util.functions). >> >> Cheers >> >> Bruno P. Kinoshita >> http://kinoshita.eti.br >> http://tupilabs.com >> >> >> - Original Message - >> > From: Matt Benson >> > To: Com

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-01-30 Thread Matt Benson
: Matt Benson > > To: Commons Developers List ; Bruno P. > Kinoshita > > Cc: > > Sent: Tuesday, January 29, 2013 8:57 PM > > Subject: Re: [functor] Change default arity of Function, Predicate and > Procedure > > > > What about in pure functional languages

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-01-29 Thread Bruno P. Kinoshita
Developers List ; Bruno P. Kinoshita > > Cc: > Sent: Tuesday, January 29, 2013 8:57 PM > Subject: Re: [functor] Change default arity of Function, Predicate and > Procedure > > What about in pure functional languages e.g. Haskell? > > Matt > > > On Tue, Jan 29, 201

Re: [functor] Change default arity of Function, Predicate and Procedure

2013-01-29 Thread Matt Benson
What about in pure functional languages e.g. Haskell? Matt On Tue, Jan 29, 2013 at 4:55 PM, Bruno P. Kinoshita < brunodepau...@yahoo.com.br> wrote: > Hi all, > > In Java 8 and Guava the default arity of a Function is 1, but in [functor] > it is 0, IOW, in Java 8 and Guava a Function is by defau

[functor] Change default arity of Function, Predicate and Procedure

2013-01-29 Thread Bruno P. Kinoshita
Hi all,  In Java 8 and Guava the default arity of a Function is 1, but in [functor] it is 0, IOW, in Java 8 and Guava a Function is by default a UnaryFunction, while in [functor] it is a NullaryFunction. What do you guys think of changing the default arity of Function, Procedure and Predicate