On Mon, Apr 18, 2011 at 12:22, Brendan Eich <[email protected]> wrote: > I agree, but in a friendly spirit suggest typing ; is a tax too, however much > lesser.
True, I overstated. It *is* a keyboard tax. But (at least in my experience) I tend to type code in a moment, and then read it for the rest of my life. I'd gladly pay a keyboard tax that lowered the cognitive burden of maintaining code. > Some expressions that do not involve calling, assigning, or otherwise > potentially having effects (declaring, where the declaration is a misplaced > function expression) still may have effects (e.g. getters). > Your suggestion seems to be to avoid analysis and warn based only the syntax > of the expression that follows on a separate line a bare, unterminated > return. I think I agree, but I wanted to call this choice out for more > discussion. > Indentation, yay. Necessary in your view, or could you just ignore everything > except the separation by a line terminator? Thinking about this a bit more, I think maybe this whole suggestion is a bad idea. Forget I said anything. Significant linebreaks are one thing, but significant indentation is deeply problematic. Maybe the solution is a way to make return's expression non-optional? If you want to return nothing, then you'd `return undefined` or `return null`. In any event, I think spending a lot of effort trying to figure out the best way to remove ASI from the language is an unprofitable path. That energy would be better spent trying to figure out how best to remove just the problems with the current ASI implementation, and not throw out the baby with the bathwater. --i _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

