Re: Two suggested changes to the interop spec
| From: | Greg Beaver | Date: | Tue, 30 Jun 2009 18:27:05 +0000 |
| Subject: | Re: Two suggested changes to the interop spec | ||
| References: | 1 | Groups: | php.standards |
| Request: | Send a blank email to standards-+get-75@lists.php.net to get a copy of this message | ||
David Zülke wrote:
> Hi folks,
>
> a) I think we should use "SHOULD", not "MUST", for the
> "Interface" and
> "Abstract" suffixes. The simple reason is that they are not required for
> the standard autoloader; it'll work no matter what the class name is.
> I've seen lots of complaints about "Interface", "Abstract" or both of
> them, and I guess it doesn't hurt to give folks some freedom there.
This makes sense, stronger separation of "must have for autoloader to
work" and "best practices"
> b) we should require that the standard Exception interface or
> implementation be put in the namespace that is the reasonable choice for
> the situation in question. For instance, ZF might have an exception per
> package, but if a small project owns a vendor namespace (e.g. PHPCouch)
> with just a couple sub-packages that are not usable independently of one
> another, it'd be nonsense to require base exceptions from all these
> subpackages, as they'd be pretty much meaningless. Maybe we could define
> a "project level" that can be either the vendor level, or the package
> level, depending on the intention of the library in question.
This also connects to my concern with requiring
vendor/subpackagename/Class in sub-packages.
Perhaps the solution is to explicitly state that a vendor can define
what a "package" is, and also to explicitly state that sub-packages can
be defined as clear entities that can optionally follow the parent
package's naming and/or exception rules?
Greg