Re: Shouldn't Optional be Serializable?

2013-09-21 Thread Simone Bordet
Hi, On Sat, Sep 21, 2013 at 10:25 AM, Remi Forax wrote: > On 09/20/2013 07:55 PM, Eamonn McManus wrote: >> >> > yes and no, >> > it depends how your RPC framework map errors because if you send an >> > Optional >> > and then throw an exception in the client you will not have a meaningful >> > sta

Re: Shouldn't Optional be Serializable?

2013-09-21 Thread Remi Forax
On 09/20/2013 09:46 PM, Martin Buchholz wrote: Both Collections.emptyList and Collections.singleton are serializable. I think of Optional as a zero-or-one collection, so it should be serializable too. Hi Martin, if Optional is a zero-or-one collection, it should implements Collection, it d

Re: Shouldn't Optional be Serializable?

2013-09-21 Thread Remi Forax
On 09/20/2013 07:55 PM, Eamonn McManus wrote: > yes and no, > it depends how your RPC framework map errors because if you send an Optional > and then throw an exception in the client you will not have a meaningful stack trace. I don't understand what this means. Concretely, why would you not