On Tue, May 11, 2021 at 5:07 PM Pierre <pierre-...@processus.org> wrote:
> Le 10/05/2021 à 18:58, Larry Garfield a écrit : > > > I agree that in the grand scheme of things this would be a minor matter, > but aesthetically I would prefer it as well. The {} annoys me, CS tools or > no. > > > > Related: I feel the same way about empty-classes and interfaces, which > is often the case for exceptions where all you're doing is declaring a > type. I figure that would get even more pushback, though. :-) > > > > As a data point, you can already do the same "semi-colon for no body" > for foreach, for, and while loops. I've only ever done it on foreach to > runout an iterator, but it works on all three today. > > > > --Larry Garfield > > I didn't saw this answer at first, but I agree that: > > ``` > > interface MyLibraryException; > > > class DefaultMyLibraryException extends \RuntimeException implements > MyLibraryException; > > ``` > > Is an excellent use case for this! > > I'm probably biased by my C++ background but to me this looks like "forward declarations" (i.e. just declares types but doesn't *define* them) :/ Regards, -- Guilliam Xavier