Re: for the sake of conversation - syntax
| From: | Stut | Date: | Tue, 30 Sep 2008 19:40:51 +0000 |
| Subject: | Re: for the sake of conversation - syntax | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-281238@lists.php.net to get a copy of this message | ||
On 30 Sep 2008, at 17:40, Nathan Rixham wrote:
Stut wrote:Sorry, I must have missed this question. Since namespaces are effectively another level or organisation above classes there's really no issue at all with only having in them, at least conceptually. In fact I'd guess you'd be implementing limitations where no limitation is necessary if you were to limit namespace contents to classes. I would hope the current PHP implementation does not have this limitation but I've not had much time to play with it yet. -Stut -- http://stut.net/Consider this... file1.php: package arse { class bandit {see I'd lock it to one class per file; multiple files/classes per package :) I think one should always keep their arse and nipple seperate. consider: file: /classes/net/stut/body/arse.php package net.stut.body.arse { class bandit {...} } package nipple { class clamp {...} } file2.php: import file1 as chest; Which package have I aliased as chest in file2.php? This could be solved using "import file1 into chest" which presumably would then give me chest::arse::bandit and chest::nipple::clamp but that's pretty nasty....} } file: /classes/net/stut/body/nipple.php package net.stut.body.nipple { class clamp {...} } file: /classes/net/stut/body/chest.php package /classes/net/stut/body/chest { import net.stut.body.nipple; class chest {...} } or file: /classes/net/stut/body/chest.php import net.stut.body.nipple; $u = new arse::bandit; whhhhhhiiiiiiiiiiiiiicccchhhhhhh leads me back to my earlier q of how would this new style work when doing things the procedural way.. even the above three lines; any potential problems there?