> From: "Brian Goetz"
> To: "Remi Forax"
> Cc: "amber-spec-experts"
> Sent: Friday, January 26, 2024 7:11:29 PM
> Subject: Re: Towards member patterns
>>> - We basically agree that at the use site, we have all the qualification
>>&
- We basically agree that at the use site, we have all the
qualification modes we have with methods { constructor qualified
with package, static member qualified with type, instance member
qualified with receiver } , and possibly, an additional mode of
"instance qualified b
> From: "Brian Goetz"
> To: "Remi Forax"
> Cc: "amber-spec-experts"
> Sent: Friday, January 26, 2024 6:30:33 PM
> Subject: Re: Towards member patterns
>>> (It could also be a default pattern; works the same as default methods.)
(It could also be a default pattern; works the same as default
methods.) The implementation in emptyList always fails. The
implementation in ArrayList might look like:
public __inverse List withElement(T element) {
if (that.size > 0)
_yield tha
> From: "Gavin Bierman"
> To: "Remi Forax"
> Cc: "Brian Goetz" , "amber-spec-experts"
>
> Sent: Friday, January 26, 2024 1:36:22 PM
> Subject: Re: Towards member patterns
> Hi Remi,
>> On 26 Jan 2024, at 11:08, Remi Forax
> From: "Brian Goetz"
> To: "Remi Forax"
> Cc: "amber-spec-experts"
> Sent: Friday, January 26, 2024 1:31:54 PM
> Subject: Re: Towards member patterns
>> I think your proposal solves the cases where the type you are switching on is
>>
AN easy example is regular expressions. We have a class
j.u.regex.Pattern, which represents a compiled regex. A regular
expression match is a form of pattern match (there's a match
candidate, it is conditional, if it succeeds we extract the capture
groups.) Surely we should expose a "ma
Hi Remi,
On 26 Jan 2024, at 11:08, Remi Forax wrote:
Let's retry.
I think your proposal solves the cases where the type you are switching on is
closed (final, sealed) but not if the type is open (non-sealed).
Let's take an example, let suppose I've the following hierarchy
public sealed inte
I think your proposal solves the cases where the type you are switching on is
closed (final, sealed) but not if the type is open (non-sealed).
A bold claim! Let's see how this stacks up.
Let's take an example, let suppose I've the following hierarchy
public sealed interface Tree {
..
return list;
}
I really think that not using 'that' as the receiver when calling an inverse
instance method is a missing opportunity because without that (again :) ),
there is no way to call an inverse abstract method, so no way to pattern match
on an open hierarchy.
regard
Hello,
I agree until the section 'Recovering static factory arguments', because at
that point, it's the tail waging the dog.
I'm not sure which is tail and which is dog here, but it sure sounds
like you are saying "the entire premise of this exercise is flawed, so
we should throw all this w
Original Message -
> From: "Brian Goetz"
> To: "amber-spec-experts"
> Sent: Tuesday, January 23, 2024 8:57:51 PM
> Subject: Re: Towards member patterns
> I was told that the formatting of the earlier version was borked, so
> re-sending, hopefully wit
I was told that the formatting of the earlier version was borked, so
re-sending, hopefully without any formatting this time
# Towards member patterns
Time to check in on where things are in the bigger picture of patterns
as class
members. Note: while this document may have illustrative
# Towards member patterns
Time to check in on where things are in the bigger picture of patterns
as class
members. Note: while this document may have illustrative examples, you
should
not take that as a definitive statement of syntax, and Remi will not be
commenting on the syntax at this
14 matches
Mail list logo