Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105054 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 92954 invoked from network); 3 Apr 2019 20:01:04 -0000 Received: from unknown (HELO fuzic.nl) (37.97.145.176) by pb1.pair.com with SMTP; 3 Apr 2019 20:01:04 -0000 Received: from Stijn-MacBook.fritz.box.mail (82-161-213-76.ip.xs4all.nl [82.161.213.76]) by fuzic.nl (Postfix) with ESMTPSA id 39DE71E002A; Wed, 3 Apr 2019 18:56:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=stijnpeeters.nl; s=stamp; t=1554310590; bh=nofPtcWGP48EDRSenDDE508KAq1YpCuBFW0IuF1SaM8=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=EjKGdSKDSMXMwqH4gzp+tjKNH1ydrMfCksZV/Lo/ia3BIGw/kL4EbA36EMTBRenMb Vi+Sk4/4pO4AF1lqPkF3bccR5GrTglFCOhEwejzprpM2HcUY58HV3qaByZzlDTfyMb ZdeyLJnqRPMwpHuKXOqWUGARozSr6uXJmFG2uSuw= Date: Wed, 3 Apr 2019 18:56:24 +0200 To: "M. W. Moe" Cc: PHP internals Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="5ca4e5bd_30718a18_311" Subject: Re: [PHP-DEV] Question about adding !function_identifier From: ik@stijnpeeters.nl (Stijn Peeters) --5ca4e5bd_30718a18_311 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I think the issue here is that there is no functional difference between = an exclamation mark prefix and a docblock attribute, and the latter has t= he advantage of being more explicit, not requiring changes to the languag= e syntax itself, and being an already-existing standard.=C2=A0 Of course things may move around during the development process, but I do= n't really see how you can't move around the docblocks with the functions= they belong to... A decent IDE will make this easy and can also use the = =40throws tag to provide the contextual information you're looking for, a= gain, without having to change the language itself. Best, Stijn Op 3 april 2019 bij 18:52:58, M. W. Moe (mo.mu.wss=40gmail.com) schreef: Hello, =20 not documenting at first is not really a question of laziness or so, as =20 things are still moving around =20 you absolutely need this agility; a good design layout between theory and= =20 stable state will refactored =20 discussed a thousand times; that what I expect from engineers; filling th= e =20 gaps between assumptions =20 and reality. =20 And for me-self throw vs no throw is important language information and =20 part of internal behaviors; =20 to clarify, for instance, would be more useful to have such indicator =20 rather than having having =20 abstract and interface which are cumbersome; same as the extra public =20 keyword; you can do without =20 especially with the new traits construct. =20 Best. =20 On Wed, Apr 3, 2019 at 9:42 AM Rowan Collins = =20 wrote: =20 > On Wed, 3 Apr 2019 at 17:27, M. W. Moe wrote: =20 > =20 > > yes this is very true; but usually on complex design with a lot of fo= lks =20 > > working on it you start coding before documenting; =20 > > =20 > =20 > =20 > If it's just syntax that doesn't change behaviour, it's really just =20 > documentation anyway, and if people are so desperate to dig into the co= de =20 > that they can't write a minimal docblock (or so lazy that they won't), = how =20 > likely is it that they'll correctly add this new indicator=3F =20 > =20 > If you want to be explicit, don't put off docblocks until later (writin= g =20 > them before you've even implemented the function can be a great way of = =20 > clarifying your design), and use an IDE or CI tool that will tell you w= hen =20 > they're missing or incorrect. =20 > =20 > Regards, =20 > -- =20 > Rowan Collins =20 > =5BIMSoP=5D =20 > =20 --5ca4e5bd_30718a18_311--