- Mail original -
> De: "Tagir Valeev"
> À: "Remi Forax"
> Cc: "amber-spec-experts"
> Envoyé: Lundi 4 Mars 2019 10:13:40
> Objet: Re: Patterns for arrays of specific length
> Hello!
>
>> Arrays.stream(resolveResu
Hello!
> Arrays.stream(resolveResults).findFirst().filter(ResolveResult::isValidResult).map(ResolveResult::getElement).orElse(null)
This is obviously wrong: we need to return non-null result only if
there's exactly one resolve result. As IDE we need to support
incorrect code, in particular where
"Brian Goetz"
> À: "Tagir Valeev"
> Cc: "amber-spec-experts"
> Envoyé: Lundi 4 Mars 2019 08:34:46
> Objet: Re: Patterns for arrays of specific length
> In general, there’s a duality between the ways in which we construct
> composites
> and the w
Hi Tagir,
- Mail original -
> De: "Tagir Valeev"
> À: "amber-spec-experts"
> Envoyé: Lundi 4 Mars 2019 04:30:09
> Objet: Patterns for arrays of specific length
> Hello!
>
> In intellij IDEA code we often see snippets like this:
>
> fina
In general, there’s a duality between the ways in which we construct composites
and the way we deconstruct them. There’s an obvious duality between
constructor and deconstructor patterns; between static factories and static
patterns, etc.
For structural composites, the obvious place to start
Hello!
In intellij IDEA code we often see snippets like this:
final ResolveResult[] resolveResults = multiResolve(false);
return resolveResults.length == 1 && resolveResults[0].isValidResult() ?
resolveResults[0].getElement() : null;
I wonder if special kind of patterns to cover such case