> However, I guess this new feature would slow down the parsing process and
> therefore I am against it.
It might slow the process down because on every assignment you have to
make sure it's not a final variable. Until we really know how much
that slows it down, I'm not sure that is much of an iss
.
-Ursprüngliche Nachricht-
Von: amaury.bouch...@gmail.com [mailto:amaury.bouch...@gmail.com] Im Auftrag
von Amaury Bouchard
Gesendet: Dienstag, 28. Mai 2013 13:44
An: Sebastian Krebs
Cc: Maciek Sokolewicz; Lars Strojny; Ferenc Kovacs; PHP Internals
Betreff: Re: [PHP-DEV] supporting the final keyword for
2013/5/28 Sebastian Krebs
>
> And in your example you have to know, that you are "manipulating" a
> variable :?
>
>
Sure. But my example's goal was to show the idea of Lars.
Using the "final" keyword on variables would allow to manipulate variables
and "constant variables", without the need to kn
2013/5/28 Amaury Bouchard
> 2013/5/28 Sebastian Krebs
>
>>print($$b);
>>>
>>
>> print(constant($b));
>>
>
> It's definitely different. In your example you have to know that you are
> manipulating constants only.
>
>
And in your example you have to know, that you are "manipulating" a
variable
On Tue, May 28, 2013 at 10:58 AM, Lars Strojny wrote:
> Hi Ferenc,
>
> Am 28.05.2013 um 08:15 schrieb Ferenc Kovacs :
> [...]
> >> I would like it to work the same way as it does in java(
> >> http://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html#jls-4.12.4)
> >> eg. you can set the initial
2013/5/28 Sebastian Krebs
>print($$b);
>>
>
> print(constant($b));
>
It's definitely different. In your example you have to know that you are
manipulating constants only.
2013/5/28 Amaury Bouchard
> 2013/5/28 Maciek Sokolewicz
>
> > It’s a good idea in general but what about having it for variables as
> >> well? Could open interesting possibilities for an optimizer.
> >>
> >> final $foo = "str";
> >> $foo = "bar"; // bails out
> >>
> >> Don't we already have tha
2013/5/28 Maciek Sokolewicz
> It’s a good idea in general but what about having it for variables as
>> well? Could open interesting possibilities for an optimizer.
>>
>> final $foo = "str";
>> $foo = "bar"; // bails out
>>
>> Don't we already have that? It just has a different name: constants.
On 28-5-2013 10:58, Lars Strojny wrote:
Hi Ferenc,
Am 28.05.2013 um 08:15 schrieb Ferenc Kovacs :
[...]
I would like it to work the same way as it does in java(
http://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html#jls-4.12.4)
eg. you can set the initial value either in the declaration or
Hi Ferenc,
Am 28.05.2013 um 08:15 schrieb Ferenc Kovacs :
[...]
>> I would like it to work the same way as it does in java(
>> http://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html#jls-4.12.4)
>> eg. you can set the initial value either in the declaration or later on,
>> but after it is set,
On Mon, Jul 16, 2012 at 3:42 PM, Pierre Joye wrote:
> hi,
>
> On Mon, Jul 16, 2012 at 2:25 PM, Ferenc Kovacs wrote:
>
> > The recent
> http://www.mail-archive.com/internals@lists.php.net/msg59301.html
> > discussion
> > made me wonder why did we decide not supporting the final keywords for
> > p
It could be useful (given the example of Java usage).
But still, if the goal is to have read-only attributes, I think my proposal
(separate reading and writing visibilities) is more precise and powerful.
2012/7/16 Ferenc Kovacs
> Hi,
>
> The recent
> http://www.mail-archive.com/internals@lists.p
In that case, we should use what C# calls it, "readonly". Writable
only once by the constructor.
On 16 July 2012 14:35, Nikita Popov wrote:
> On Mon, Jul 16, 2012 at 2:25 PM, Ferenc Kovacs wrote:
>> Hi,
>>
>> The recent http://www.mail-archive.com/internals@lists.php.net/msg59301.html
>> discuss
hi,
On Mon, Jul 16, 2012 at 2:25 PM, Ferenc Kovacs wrote:
> The recent http://www.mail-archive.com/internals@lists.php.net/msg59301.html
> discussion
> made me wonder why did we decide not supporting the final keywords for
> properties as it would provide an easy way for read-only attributes (co
On Mon, Jul 16, 2012 at 2:25 PM, Ferenc Kovacs wrote:
> Hi,
>
> The recent http://www.mail-archive.com/internals@lists.php.net/msg59301.html
> discussion
> made me wonder why did we decide not supporting the final keywords for
> properties as it would provide an easy way for read-only attributes (
On Mon, Jul 16, 2012 at 2:59 PM, Anthony Ferrara wrote:
> Ferenc,
>
> On Mon, Jul 16, 2012 at 8:25 AM, Ferenc Kovacs wrote:
>
>> Hi,
>>
>> The recent
>> http://www.mail-archive.com/internals@lists.php.net/msg59301.html
>> discussion
>> made me wonder why did we decide not supporting the final key
Ferenc,
On Mon, Jul 16, 2012 at 8:25 AM, Ferenc Kovacs wrote:
> Hi,
>
> The recent
> http://www.mail-archive.com/internals@lists.php.net/msg59301.html
> discussion
> made me wonder why did we decide not supporting the final keywords for
> properties as it would provide an easy way for read-only
C# does this with the readonly keyword, sounds like a good idea.
On 16 July 2012 13:25, Ferenc Kovacs wrote:
> Hi,
>
> The recent http://www.mail-archive.com/internals@lists.php.net/msg59301.html
> discussion
> made me wonder why did we decide not supporting the final keywords for
> properties as
Hi,
The recent http://www.mail-archive.com/internals@lists.php.net/msg59301.html
discussion
made me wonder why did we decide not supporting the final keywords for
properties as it would provide an easy way for read-only attributes (const
would be a better choice in performance wise, but then you c
19 matches
Mail list logo