It's <?. though, not > On Fri, Sep 6, 2019, 20:14 Jordan Harband <[email protected]> wrote:
> Syntactically marking, in a chain, what you'd like the final value of the > chain to be, seems interesting - forcing optionality into it seems > unnecessary, though, if such a syntactic marker could be attached to all > forms of property access. > > Something like: `a.b>.c.d` or `a?.b>?.c?.d` or `a>[b][c][d]`. > > (Obviously, the `>` won't work with bracket, and any syntax for normal > properties that only applies to dot and not also bracket would somewhat be > a nonstarter; but the specific syntax can be bikeshedded separately) > > On Fri, Sep 6, 2019 at 8:04 AM Andrea Giammarchi < > [email protected]> wrote: > >> Indeed I'm not super convinced myself about the "branching issue" 'cause >> `const result = this?.is?.branching?.already` and all I am proposing is to >> hint the syntax where to stop in case something else fails down the line, >> as in `const result = this.?.is<?.branching?.too` to know that if any other >> part is not reached, there is a certain point to keep going (which is, >> example, checking that `result !== this`) >> >> On Fri, Sep 6, 2019 at 4:17 PM Naveen Chawla <[email protected]> >> wrote: >> >>> Typically, "dot" expressions navigate through values of different types, >>> making "type branching" the inevitable next step in those cases (unless you >>> introduce a common method for further processing for each of those types). >>> So I'm not sure how ultimately that would be avoided. >>> >>> On Fri, 6 Sep 2019 at 14:15, Claude Pache <[email protected]> >>> wrote: >>> >>>> >>>> >>>> Le 6 sept. 2019 à 14:35, Felipe Nascimento de Moura < >>>> [email protected]> a écrit : >>>> >>>> Doesn't that bring risks to breaking the web? >>>> >>>> You seen, many, MANY servers running php have the "shot-tags" feature >>>> enabled, in which pages with <? and ?> will be interpreted. >>>> In this case, any html page with embedded scripts using this operator, >>>> or event .js files when the server is configured to also run php in them, >>>> will break. >>>> >>>> Or am I missing something here? >>>> >>>> [ ]s >>>> >>>> >>>> Any future PHP file that incorporate that syntax will almost surely >>>> refuse to compile on servers that has short-tags enabled, making the >>>> problem evident before it produces something useful on the web. This may be >>>> an issue, but this is not what “breaking the web” is intended to mean. >>>> Existing, untouched content will not break. Carelessly updated content >>>> might break, but that’s not fundamentally different from any other careless >>>> update. >>>> >>>> (If anything else, it may convince people that having different >>>> configuration settings w.r.t. short-tags in development environment and in >>>> production environment, is a very bad idea...) >>>> >>>> —Claude >>>> _______________________________________________ >>>> es-discuss mailing list >>>> [email protected] >>>> https://mail.mozilla.org/listinfo/es-discuss >>>> >>> _______________________________________________ >>> es-discuss mailing list >>> [email protected] >>> https://mail.mozilla.org/listinfo/es-discuss >>> >> _______________________________________________ >> es-discuss mailing list >> [email protected] >> https://mail.mozilla.org/listinfo/es-discuss >> >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

