мозговой штурм

From: Date: Fri, 21 Oct 2011 19:35:28 +0000
Subject: мозговой штурм
Groups: php.doc.ru 
Request: Send a blank email to doc-ru+get-2949@lists.php.net to get a copy of this message
Приветствую! Попалось очень веселое предложение для перевода. Контекст: http://docs.php.net/manual/en/closure.bindto.php . Предложение: > To this end, > non-static closures that are given a scope but a &null; instance are made > static and non-static non-scoped closures that are given a non-null > instance are scoped to an unspecified class. Сразу скажу - предложение лучше разбить на две логические части: > "To this end, > non-static closures that are given a scope but a &null; instance are made > static" и "non-static non-scoped closures that are given a non-null > instance are scoped to an unspecified class." Вот еще вам пару строк для размышления из https://wiki.php.net/rfc/closures/object-extension . > "The patch preserves these invariants: > 1. A static closure, being scoped or not, cannot have any bound instance. > 2. A non static closure has a bound instance iif it is scoped. > To preserve these invariants, there are these additional rules: > 1. If a non static closure is given a scope (or it already has a scope, but > the scope parameter is not specified) and a NULL instance, it's made static. > 2. If a static closure is given an instance, the instance is ignored and an > E_WARNING notice is emitted. > 3. If a non static non scoped (and therefore non bound) instance is given > no scope and a non NULL instance, it's given a dummy scope (currently the > “Closure” scope). This is the only case where the previous scope, or lack > thereof, is changed by the rebinding process. This is necessary because it's > not legal to have $this with a NULL scope. " (их переводить не нужно - они нам в помощь) Начинаем мозговой штурм! ;) With regards, Alexander Moskaliov Irker@irker.net

« previous php.doc.ru (#2949) next »