On Feb 20, 2015, at 10:30 AM, Rasmus Lerdorf wrote:
> On 02/20/2015 09:39 AM, Anthony Ferrara wrote:
>> I think if anything, the appearance of Hack (and its adoption) show
>> that people want static typing, at least to some level...
>
> To be perfectly transparent here though, you should mention
On Dec 12, 2014, at 11:09 AM, Josh Watzman wrote:
> On Dec 10, 2014, at 11:24 PM, Stanislav Malyshev wrote:
>
>>> the real-world code I've seen, it is the least confusing. (I'll see
>>
>> Which real-world code you are talking about? Examples please.
&
On Dec 10, 2014, at 11:24 PM, Stanislav Malyshev wrote:
>> the real-world code I've seen, it is the least confusing. (I'll see
>
> Which real-world code you are talking about? Examples please.
I'm having trouble digging any up -- FB's codebase has >10k occurrences of this
feature and I have ye
On Dec 10, 2014, at 4:12 PM, Christoph Becker wrote:
> Josh Watzman wrote:
>
>> However, for a lot of failures, I don't feel that exceptions are
>> appropriate. I tend to only use them for exceptional behavior --
>> usually, some failure that needs to be propaga
On Dec 10, 2014, at 12:30 PM, Robert Stoll wrote:
> I stick with it, evaluating it does not make sense IMO. If I want to execute
> it in any case then I would do something
> like this currently
>
> $g = g();
> $h = h();
> if($x !== null){
> $x->foo($g, $h)->bar(baz());
> }
>
> And with the ?-
>> .huh? I'm not talking about exceptions the object itself throws. In PHP 7,
>> if Nikita's RFC passes, trying to call a method on
>> NULL will throw an exception. That largely negates the need for a special
>> operator, since you can just catch the exception.
>>
>> Thanks.
>> --
>> Andrea Fau
On Dec 10, 2014, at 9:19 AM, Andrea Faulds wrote:
> Hi again,
>
> I was in favour of this, but upon further thought, I’m not sure I am. I
> remember I also initially liked it in Hack and then lost interest.
>
> First, how is this substantially different from catching an exception? With
> Niki
On Dec 10, 2014, at 8:17 AM, Robert Stoll wrote:
> First of all, I like the RFC, I think as well that it is a useful feature for
> PHP and I already have it on my wish list
> ;)
>
> Yet, either I misunderstand the section about short circuiting or I propose
> to change the behaviour.
>
> "If
On Dec 9, 2014, at 3:18 PM, Andrea Faulds wrote:
>> On 9 Dec 2014, at 23:07, Josh Watzman wrote:
>>
>> Hey internals! A useful feature that Hack picked up in the last few months
>> are "nullsafe calls", a way of propagating failure forward in a series of
>
would be a good one for PHP as
well, so I'm submitting this RFC to add it -- you can see the RFC itself for a
full discussion of the motivation for the feature, as well as the feature
itself:
https://wiki.php.net/rfc/nullsafe_calls
Josh Watzman
--
PHP Internals - PHP Runtime Development
ether means you have a class that has no instances itself, and
cannot be subclasses, so you can never have an object of that type. The use
cases for being able to override such a class are questionable at best, as
above.
This really is just the combination of two existing class modifiers -- no ne
On Oct 20, 2014, at 6:17 PM, Andrea Faulds wrote:
>> On 21 Oct 2014, at 02:07, Josh Watzman wrote:
>>
>> Throwing an exception or even returning NULL seems so much better than
>> returning "false" -- "false" is a boolean, not an error, and despite s
On Oct 20, 2014, at 3:57 PM, Andrea Faulds wrote:
> Good evening,
>
> I am presenting a new RFC to add a set of three functions to do validated
> casts for scalar types:
>
> https://wiki.php.net/rfc/safe_cast
>
> Please read it.
>
> Thanks!
I think this is pretty cool, but I'm really worrie
On Aug 10, 2014, at 11:20 AM, Andrea Faulds wrote:
> Hi!
>
> Sorry for the slow response, I’ve been on holiday.
No problem!
> On 8 Aug 2014, at 01:32, Josh Watzman wrote:
>
>> The RFC goes a long way to fixing this, but one important place it misses is
>>
[Andrea, please forward this to internals if you don't see my message appear
there in a few hours; as you know, FB is working through issues sending email
to internals, and though I think I know how to get it through, if it doesn't
make it, please help :) Thanks!]
On Aug 4, 2014, at 12:49 PM, A
detail that "strict enforcement" for scalars is
defined in terms of "lossless conversion" as outlined in the RFC, since that's
the "PHP way" of loosely dealing with scalar types. The idea of "lossless
conversion" has just never been relevant before since
16 matches
Mail list logo