« first day (1466 days earlier)      last day (3485 days later) » 

4:00 PM
@AndreaFaulds yeah, no :-P
 
@Narf ty
 
@FlorianMargaine np
 
@AndreaFaulds that would be... a political move
 
@AndreaFaulds that was very good ...
if Anthony doesn't think we are doing it wrong, then let's see a patch ... you can have one hour ...
I kid I kid, there's no time limit for this task ... well there is, but it's a year and a few months or whatever ...
 
I'll name it readonly for the time being, it needs a working title
Might not be the final name though
 
4:03 PM
@JoeWatkins Not if Zend have anything to say about it, I think they'd rather release it tomorrow or something
 
not going to shoot anyone down for optimism ...
 
it's not optimism
 
it's all very well to say "we need a list of features before we can set a date" but it's ignorant of the fact that nobody is in a position to write that list ... it's not achievable ...
 
@AndreaFaulds On the plus side, we have documented stuff using that keyword in the manual, and in that context it means exactly what we are talking about
 
@DaveRandom pushed it, sorry it's crap, if you let me see the end result maybe I can make it better.
 
4:05 PM
@DaveRandom Oh, we have?
 
user895378
@JoeWatkins hehehe, you're so mean :)
 
@webarto It's already waaaay better (and quicker) than anything I could come up with
 
posted on October 21, 2014 by kbironneau

/* by fishBulb */

 
13:46 <dmitry> cjones: the problem that we longer we delay PHP7 release the more market we will lose to HHVM
13:46 <dmitry> see en.m.wikipedia.org/wiki/Wikipedia:Wikipedia_Signpost/2014-10-08/…
13:46 <dmitry> and HHVM is really not much better now
 
4:05 PM
Aha
Oh no, how terrible, PHP will lose to HHVM by not being super-fast?
Why don't we try to win with features?
 
@ircmaxell it doesn't change that it's optimistic to believe that all the work that needs to be done can be done in their time frame ... their motives don't really matter, to me ...
 
I see Phil has another blog post up.
 
Performance is not the only issue. It's an issue for Facebook and Wikipedia. It's not quite as big an issue for 90% of sites.
 
@Fabien good read ...
 
user895378
@ircmaxell This backs up my previous assertions that phpng was a knee-jerk reaction to hhvm
 
4:07 PM
I feel like we're touching on a topic I would like to see discussed more which is "popularity != competency"
 
commit a30584e8f8ba91d3ea098c96b274409853527e17
Author: Dejan Marjanovic <dm@php.net>
Date:   Tue Oct 21 18:04:30 2014 +0200

    My hands are typing words
    Haaaaaands
2
 
phpng is a good thing for the engine though
 
something that takes a year is not knee jerk ...
 
@webarto git config --global alias.save "commit -a --allow-empty-message --no-edit"
 
user895378
@JoeWatkins Disagree. The impetus was knee-jerk. Either way it's a good result for PHP. I just think PHP7 deserves more than "perf improvements" and shouldn't be rushed.
 
user895378
4:08 PM
Perf isn't enough to justify a new major.
 
@KevinMGranger Hmmm, interesting, but I wouldn't commit without message in the first place I think.
 
@rdlowrey We'll most likely get return types.
So there's that.
Kind of a big deal.
 
well yes obviously, but we have time to propose them, but zend aren't in a position to decide what can be proposed, they can't come up with a timeline based on the features we want because most of those features probably aren't proposed yet ...
so let them worry about what is important to them ...
 
user895378
@LeviMorrison Kind of definitely a big deal
 
@webarto A commit without a message is just as good as a commit with a meaningless message, I think. Except with less comedic value
 
4:10 PM
We might get bigints if I get my way...
 
user895378
@LeviMorrison When I can haz vote? I keep waiting.
 
@AndreaFaulds except 90% of the people think it is
 
@KevinMGranger you can at least grep for "My hands are", not for empty
 
@rdlowrey I need to fix a bug or two.
I guess I could open voting before fixing them.
 
@ircmaxell True, perceptions matter too :/
 
user895378
4:11 PM
@LeviMorrison nah there's no rush. Get it right first :)
 
People care too much about benchmarks. But benchmarks are LIES!
 
user895378
@AndreaFaulds All of them are LIES.
 
user895378
It's a shame.
 
I think true perf improvements on the language level are good. They help a wide variety of users.
 
user895378
But this is a problem for all of humanity. We aren't good at logic. Otherwise marketing wouldn't work. We see "oooooh shiny" and lose our minds.
 
4:12 PM
Bigints will help a much smaller group of users. That's not to say they are bad or not worth spending time on; I don't mean that.
 
@AndreaFaulds Until composer gets optimised or people start using their own repos more, it is a bit of an issue for large projects. It's not unheard of for composer update to take 20 minutes...
 
@KevinMGranger That's true, no question 'bout it.
 
I just mean that the improvements and changes that help the most users are generally the most helpful, by definition ^^
 
@Danack How is composer update related to php perf?
 
@AndreaFaulds Some people have switched to HHVM just to do the composer update faster.
 
4:13 PM
...
 
user895378
I still believe composer's problem is synchronous IO, not language speed.
 
user895378
You could eliminate almost all of the composer waiting with correct artax usage :)
 
@rdlowrey That's the smaller problem.....it's storing the requirements as a huge set of variables (like a couple hundred megs worth) and evaluating the result....then downloading slowly.
For most people the download is fast as composer caches all the things....but it does sit there calculating version requirements for ages.
 
@ircmaxell is that message from php.pecl ?? I missed that conversation ... shocking motivation ...
 
Cache ALL THE THINGS!
 
user895378
4:15 PM
@Danack Maybe. My opinions are unsubstantiated on this front as I've not looked into what they're really doing.
 
I have...I don't recommend reading that code....
 
If you feel like contributing, it seems like someone is trying to pick up the record for the most downvotes: meta.stackoverflow.com/a/274959/1443490
 
user895378
@Danack The brief perusal I did do showed lots of extraordinarily slow things.
 
user895378
HHVM shouldn't be a substitute for writing efficient code.
 
user895378
4:18 PM
One unfortunate consequence of the rise of FIG and the cult of symfony is that people write perf-sensitive code with no thought to performance. So you get a lot of perfectly abstracted OO code that's really slow ... (this opinion is the result of personal observation).
 
@Danack Request memory limits! :D
 
@cheesemacfly I saw that yesterday and thought they were fools to have tried it. And then they do this. Wow
 
also, we should really do some comma grouping with mem size
94,371,840B is much clearer (94MB)
 
@Machavity Yep, not learning from their mistakes apparently...
 
MOAR DOWNVOTES!
It's almost to -100. Or, in Meta SO terms, mildly unpopular
 
user895378
4:24 PM
@Fabien I've pushed some changes to master (but not tagged). If you set your composer version requirement to 1.0.x-dev it will retrieve the master branch. Please let me know if that resolves the issue you were having.
 
Will do @rdlowrey but most likely by tomorrow. End of the day for me \o/ :)
 
user895378
@Fabien no worries. I'm not in a hurry if you aren't. Have a nice evening :)
 
Cheers
 
So...
 
Yeah...
 
4:28 PM
While public readonly $x is confusing...
Might readonly public $x be alright?
We already do this in the manual.
 
user895378
You aren't suggesting an ordering requirement in the code are you?
 
No... though I have actually implemented it with an ordering requirement, though not deliberately
I could remove that ordering requirement
 
user895378
Ordering doesn't make sense to me as none of the existing accessibility keywords require specific ordering.
 
user895378
static private == private static
 
Except for var
 
user895378
4:31 PM
Do people actually use var?
 
Don't think so
 
user895378
I wish that one would go away ...
 
Might be a PHP4 legacy?
 
user895378
That's the only justification I know of.
 
wasn't that deprecated at some point?
 
user895378
4:32 PM
I don't think so.
 
user895378
I realise BC is very important but does PHP7 really need to retain compat for PHP4 OO code?
 
You could quite trivially write a script to replace it with public
With ext/tokeniser
 
user895378
yup.
 
@JoeWatkins yesterday
 
@rdlowrey Write an RFC and patch. Removing support is literally one line to remove from the parser.
 
user895378
4:33 PM
Things like WP don't still support < 5.3 do they?
 
@AndreaFaulds yes, but rather than letting perceptions drive us, we should be educating them
 
WP supports 5.2 doesn't it?
 
user895378
Gross. I don't know, just asking.
 
> However, var is no longer required. In versions of PHP from 5.0 to 5.1.3, the use of var was considered deprecated and would issue an E_STRICT warning, but since PHP 5.1.3 it is no longer deprecated and does not issue the warning.
right, E_STRICT
 
I have a fondness for var - it means 'I have not thought about whether this should be a public or private variable, use at your own risk'.
 
4:34 PM
To me, "supported for backwards compatibility reasons" means deprecated, but it doesn't explicitly say that.
 
user895378
@Narf ah, there ya go.
 
@KevinMGranger I don't believe it emits a notice or anything.
 
Not anymore, as noted above. But php.net says " The PHP 4 method of declaring a variable with the var keyword is still supported for compatibility reasons"
 
@AndreaFaulds Or regexp.
 
4:37 PM
variable_modifiers:
        non_empty_member_modifiers              { $$ = $1; }
    |   T_VAR                                   { $$ = ZEND_ACC_PUBLIC; }
    |   T_READONLY non_empty_member_modifiers   { $$ = $2 | ZEND_ACC_READONLY; }
;
I could put T_READONLY in non_empty_member_modifiers which has all the usual ones, but then I'd have to prohibit it for methods
Which isn't hard, actually, that's easy as hell, this is just how I've done it for now...
$ sapi/cli/php -r 'class FooBar { readonly private $x; }'

Fatal error: Properties cannot be both readonly and private in Command line code on line 1
:D
 
not sure why you want to have non empty modifiers and readonly ... I would add ACC_READONLY to PPP_MASK and use it on its own, it defines accessibility such that public/protected/private are not necessary ...
 
Now to just make readonly actually do something...
 
user895378
@JoeWatkins +1
 
@JoeWatkins So have it be like T_VAR then?
Oh, no I see what you're saying
hmm
 
afk
 
4:41 PM
@AndreaFaulds Why don't we just use 'const'?
:(
QQ
 
Have you been following this discussion at all? This is nothing like C#'s readonly.
 
Why not 'readable' or 'visible'?
 
That could work, but it's a little weird... isn't it readable anyway?
 
yes, but it's also not really read-only :)
unless I'm missing something (didn't read, just assuming it's about properties being read-only from outside the class scope)
 
@AndreaFaulds I reviewed the chat log, but basically this means that from outside the class you can read the variable but not write to it, or take a reference or that kind of stuff, yes?
If that is true, I'd prefer using getters and setters ala Dart (not C#) instead of having a 'readonly' modifier.
 
4:45 PM
@LeviMorrison Right.
@LeviMorrison Hmm, what does Dart do?
 
user1994804
Am I imagining things or is it true that [a-Z] once was the way to match a letter case insensitive??
 
user1994804
in preg_match with php
 
But if you want 'readonly' you don't define setters.
 
That's not much different from C#
 
4:51 PM
The difference is that C#'s syntax is pretty retarded.
Actually, that's not quite true.
C# has a 'short-hand' syntax that I think is a genuine terror.
I have only seen the short-hand in the wild, never the 'long' form that is very similar to Dart.
public class Person
{
    //default constructor
    public Person() {}

    private string _Name;
    public string Name {
        set { this._Name = value; }
        get { return this._Name; }
    }
}
 
I don't really understand what's wrong with C#'s syntax. Especially if readonly is rendered moot by anyone writing their own getters and setters
 
I don't like having two properties
I want one property with varying accessibility.
 
If we did C# auto-generated style, you would only have 2 properties when someone needs it
 
@KevinMGranger The 'long-hand' C# syntax is good. The stupid 'short-hand' version is retarded because there is magic.
 
like, $Foo { public get; set; } does what readonly does
 
4:55 PM
I don't want two properties.
I want one.
 
If people are writing "proper" OOP they'd be using getters and setters and therefore never need to use the readonly property since they just don't make a public setter
yeah I don't necessarily like having two properties either :/
 
Rubbish
setters and getters are a workaround for a lack of differing visibility for get and set
 
@AndreaFaulds ...that's not true.
 
Well, not always.
Sometimes there's validation, type enforcement, etc.
 
Getters and setters are valuable by themselves, but also provide a means for differing visibility.
 
4:57 PM
I don't mean they are generally
I mean they're the wrong thing to use for this
 
They have value on their own
 
user895378
Sometimes a property really is a property, though. If you can provide safety from outside modification without the superfluous overhead of a method call it's a win for everyone.
 
@LeviMorrison Because having two properties just to vary the visibility of a single "property" is... well, weird.
 
user895378
Sometimes OO is just stupid. If we can achieve the benefits of OO in a given scenario without incurring the normal costs then it seems like a no-brainer.
 
4:58 PM
@rdlowrey Right. And without the weirdness of using a property not as a property but as a method
 
@AndreaFaulds Better than readonly which you can actually write to in some contexts, that's my $0.02 anyway
Also, I'd much rather have property accessors than readonly, and you have to admit there is some overlapping use-case.
 
You don't need two properties to do this, though. That's only if you want to set things internally without going through the public setter.
You could do something like this:

    class Foo {
        $Foo {
            public get;
            public set { /* logic here */};
            private set;
        }
    }

There, no second property. But that starts getting into overloading based on accessibility level which is arguably very messy
 
Basically...
readonly public $foo; would be the same as C#'s public $foo { public get; protected set; } but with no magic extra property
As it's a real property
 
Okay I apparently can't do monospacing
 
What does c2 represent?
 
5:01 PM
@KevinMGranger four spaces before each line, click "fixed font"
 
@PeeHaa Two less than c4.
I win!
 
@LeviMorrison There is overlapping, but that doesn't make readonly useless - its quite often just what I want. I hate defining getters for the same purposes and I hate __get() not throwing warnings for undefined properties.
 
@PeeHaa 16^12 + 2
 
@AndreaFaulds thank you
 
Where the fuck does that come from...
 
user1994804
5:02 PM
Has anyone ever heard of using [a-Z] for case insensitive preg_match matching?
 
linebreak something, linebreak something, something else :|
 
user1994804
in php
 
user895378
@KevinMGranger Or just press ctrl+k while the text input box is focused.
 
@YourAdrenalineFix No, but it could have something to do with the ASCII table.
 
user895378
@YourAdrenalineFix $pattern = "/[a-z]/i";
 
user895378
5:04 PM
where the "i" modifier indicates "case-insensitive"
 
user1994804
@Narf could u elaborate on ould have something to do with the ASCII table
 
user1994804
@rdlowrey that's what I was familiar with but I thought I had heard a-Z was a method also
 
user1994804
I was just seeking clarification
 
user1994804
Bad Info I picked up somewhere along the way
 
@YourAdrenalineFix the assumption that capital letters come after lowercase in ASCII, but it's not true
 
5:06 PM
@YourAdrenalineFix Well, if 'A' comes before 'a' in ASCII (which means it should be [A-z] instead of [a-Z]) and you're specifying a range of characters ... you get the idea, though that would include not only letters.
 
Exactly. It would also pick up 91-96 which includes []^_`
err and \\
Not doing well with SO chat markup today :P
 
user1994804
Hmm
 
user1994804
Thanks guys
 
user895378
@KevinMGranger It's not just you
 
Good morning to you
 
5:10 PM
yo @Chris
 
I think I save too much for PHPStorm. It doesn't like my habit of pressing CTRL-S ten times after I type a line of code, and it hangs.
That might be a "doctor, it hurts when I do this..." problem.
 
user895378
@Chris Are your files on a network drive? That can make things really slow in phpstorm ...
 
@rdlowrey in phpstorm any IDE
 
I have a local copy that gets deployed on save via FTP
 
user895378
Yeah, any IDE.
 
user895378
5:14 PM
@Chris Yeah, that'll probably be brutal.
 
user895378
(depending on how it's implemented)
 
Me trying a library
 
It's an ingrained habit to insert CTRL-S into my typing, picked it up in college after MS Word crashed on me one too many times in the midst of oh-shit-gonna-fail-composition-class midnight writing sessions.
 
I have autosave... I don't save
it's very relaxing.
 
user895378
If the IDE has to wait for the ftp operation on each write ... well ... that's an "xkcd compiling" situation.
 
5:16 PM
@VeeeneX xD (thumbs up, bro)
 
Me and my nano habits ... I'd only be opening files if I tried to use an IDE :D
 
5:56 PM
Hi @rdlowrey I've upgraded to the new version of Artax. I'm seeing a weird thing where the process of requests just slows down and then stops. There's no error - it's just that the HTTP traffic goes dies away with lots of requests left to process. Seems to be happening on PHP 5.4 and PHP 5.6.2. Is there anything I can enable to make debugging easier? Making a simple repo case may be tricky.
 
I've been using Java again for ten minutes and it's already totally pissing me off
 
6:14 PM
No matter how much of it I write, no matter how much of it I enjoy, no matter how concise nor elegant nor expressive it is, Ruby's syntax is wacky.
@AndreaFaulds I'd rather readonly public $foo do similarly to that of C#, whereby the property is locked after the constructor returns...
 
OK, um...
Would you mind if you can't have static readonly properties?
It seems arbitrary... but it's because implementation details
 
@LeviMorrison No more magic than we're used to; it compiles to the same IL as the long version. The auto-properties in C# are preferred for various reasons; namely being able to hook into the access of them with debugging/AOP facilities. You can't breakpoint a raw field, but you can breakpoint an auto-property.
@AndreaFaulds I'm saying I'd rather the readonly keyword be reserved for similar behavior to that of C# because I think that's sensible; I don't think it has much to do with the accessor/mutator discussion.
 
I wasn't responding to you
 
Oh :-/ sorry.
 
That was a general question
 
6:27 PM
How're you implementing readonly? As in C# or differently?
 
I'd respond to your specific thing, but it's something I've already addressed more than once... argh, sorry, I'm not in the best mood I guess. 1) We use readonly the way I'm proposing already in documentation, 2) While I'd give it another name, I can't think of a better name
@DanLugg Essentially: Publicly readable, privately writeable
 
On one hand, "yuck". On the other hand, whatever :-P
That's best solved with accessor/mutator visibility, IMO.
 
I don't like that
I don't want fake properties backed by a real private property
 
Why?
 
^ Good question
 
6:32 PM
It feels wrong. It's just a read-only property. Why can't I just have one?
 
^^ good question. If I've ever wanted public readonly, I use get/set magic with a private
 
Why unnecessarily complicate everything with getters and setters?
 
@AndreaFaulds It's not unnecessarily complicated, especially in today's development landscape.
 
No, it's unnecessarily complicated.
 
I believe you complicate the whole language for a unique use case though
 
6:33 PM
And they serve the precise purpose to solve the problem you intend to solve; prevent mutation from outside, preserve the ability to mutate inside.
^^^ What @FlorianMargaine said.
 
No, what you proposing adds complexity.
 
It adds some complexity, of course, as would any feature.
 
This adds a single keyword that handles a common use case and makes nicer interface definitions.
 
It also hijacks a keyword.
 
Yes, for a whole range of use cases. You want to add a new keyword for a single use case.
 
6:34 PM
So do you.
 
I do?
 
More than one keyword. Commonly used ones.
Sure, getters and setters means new keywords.
 
Not necessarily.
 
Not necessarily.
Damn, ninja'd
 
OK, if you'll say that, then
Adding readonly does not necessarily mean a new keyword
As in, not a new reserved word, anyway.
 
6:36 PM
public $foo { ... }
 
Well, hopefully that's a solved problem in and of itself with AST etc.
 
@FlorianMargaine That doesn't handle set
 
If you add get and set in the braces, it does. But it does add keywords, indeed
 
My point is this: accessors/mutators add complexity because they add a robust surface to program properties against; be that validation, accessibility, etc. -- adding readonly to satisfy the private-only mutation use-case, is not as robust and I personally believe the complexity and overhead of a new keyword and other caveats doesn't measure up.
 
Yeah my opinion too
 
6:40 PM
And, on a personal note, readonly would be better purposed similarly to that of C#; locked when the constructor returns, regardless of scope or visibility.
privatewriteonly would be a better (albeit ridiculous) name.
 
I am not opposed to readonly if it worked as Dan suggests, as long as we all agree that any kind of immutable property accessed from outside the class scope would SANELY throw an exception instead of monkey patching the class with a weird new public property that has the same name as the readonly one
 
^^ lol, I doubt exception, but fatal would be swell.
 
Anything other than apathy
When you are using magic get/set to implement externally immutable properties, do you have your setter throw an exception or just silently ignore attempts to mutate? Or do you trigger_error?
 
@Chris Why would it add a new property?
Accessing a private property is an error
 
@DanLugg I'm saying introducing any more magic in the language is probably a bad idea.
 
6:50 PM
@LeviMorrison Fair enough; if the choices were long-form or nothing, I'd go long-form 100%.
 
The magic properties of the last accessor proposal is one reason I voted against it.
 
I'm just saying that that magic does serve a reasonable purpose in C#, and could serve a similar purpose here; the brevity afforded by get; set; over the long alternative isn't really that magical.
 
I'm not necessarily talking about get; set; (but maybe)
set { this.property = value }; <- stupid
 
@LeviMorrison Well, yes. That's where auto-properties (get; set;) come in.
private Type  _field;

public Type Property {
    get { return _field; }
    set { _field = value; }
}

public Type Property { get; set; }
^^ are basically equivalent; there's no reason to do the first when you can simply do the second.
 
6:55 PM
I think doing the latter is bad form.
Or the former.
 
... so you think both are bad?
 
Just use public $property;
 
Yes, however, you can't set a breakpoint on public $property
 
Mon to the ring
 
@DanLugg To be honest, that's a debugger problem and not a language one.
 
6:56 PM
and it's a BC break if you want to add a custom getter/setter on public $property later on
 
@FlorianMargaine No, that's not true.
 
It absolutely shouldn't be true if we do accessors, in my opinion.
We should do them ala Dart.
 
And, with reflection for instance, if you start with a property (even a naive or auto one) the reflection is always that of a accessor/mutator property and not a raw one. If you change it in the future, you could break something.
 
ah.
sorry to repeat... how does dart do them? :D
any message link? :P
 
@AndreaFaulds Nah, sometimes PHP monkey patches over privates: 3v4l.org/B2025
 
@Chris That's because inheritance
Inheriting classes can override
 

« first day (1466 days earlier)      last day (3485 days later) »