<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">On Mar 9, 2021, at 1:45 PM, <a href="mailto:forax@univ-mlv.fr" class="">forax@univ-mlv.fr</a> wrote:<br class=""><div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Literata; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">I see the pattern + parameters has a partial application, i.e. the parameters other than the target are constants,</span><br style="caret-color: rgb(0, 0, 0); font-family: Literata; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Literata; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">the keys of the map are constant, the java.util.regex.Pattern (or the string) of a metch is a constant, etc</span><br style="caret-color: rgb(0, 0, 0); font-family: Literata; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Literata; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Literata; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">So yes, a pattern have input parameters other than the target but should they have access to the bindings, i think we are loosing a lot with that model.</span></div></blockquote></div><br class=""><div class="">If I read you correctly, you want patterns to be</div><div class="">as statically scrutable as possible, so that translation</div><div class="">strategies can boil together as much of the pattern</div><div class="">as possible before first execution, typically using</div><div class="">indy or condy to do “advanced†configuration</div><div class="">and optimization of statement logic.</div><div class=""><br class=""></div><div class="">Moreover, I think you want patterns to *reject*</div><div class="">non-constant operands, so that such configurations</div><div class="">are reliably done before first execution.</div><div class=""><br class=""></div><div class="">I whole-heartedly agree with the first goal,</div><div class="">but I think the second would be a bridge too</div><div class="">far, because various kinds of refactorings</div><div class="">can shift expressions in and out of the</div><div class="">“constant†category, and that’s useful.</div><div class=""><br class=""></div><div class="">I think we can trust users to use constants</div><div class="">in places where they are advantageous.</div><div class=""><br class=""></div><div class="">You may well ask, “but what is the language</div><div class="">support for reliably folding constants at</div><div class="">javac translation time?†And the answer</div><div class="">is “nothing yetâ€. But I think that is a job</div><div class="">for Brian’s constant-folding mechanisms,</div><div class="">building on top of his ConstantDesc work.</div><div class="">Until that point, we can live with non-constant</div><div class="">expressions. I would say, before that point,</div><div class="">it would be foolish to add indy support for</div><div class="">constant in-args, just for and only for patterns.</div><div class=""><br class=""></div><div class="">— John</div><div class=""><br class=""></div></body></html>