Hi Markus,

> On 1 Jan 2015, at 15:58, Markus Fischer <mar...@fischer.name> wrote:
> 
> On 01.01.15 16:19, Andrea Faulds wrote:
>> I think it’d be weird to have different syntaxes for scalars and 
>> non-scalars. We already use the syntax the RFC proposes in the PHP manual, 
>> and I don’t think anyone’s confused by it. 
> 
> I didn't meant to stay there's something wrong with the syntax, sorry if
> my text was confusing! I was rather trying to point out that it does not
> hint at anything but proactively tries to convert types; see below for more:

Ah, I see. Well, at least I was able to cover that syntax suggestion before 
someone else brings it up. I see your point.

> And as you also pointed out: those conversion rules are different from
> what a plain "(int)$whatever" would do.

The conversion rules are the same, it’s just that scalar hints reject certain 
values. The values they accept are converted the same. I don’t think this is 
unreasonable: implicit and explicit casts shouldn’t behave identically. 
Implicit casts need to be much stricter.

> Now, going on step back here (talking about me), I'm speaking up because
>> my< needs are developer are different (mostly speaking about backend
> code, interfaces, libraries, frameworks) but OTOH I'm not a big known
> open source framework developer either ;)
> 
> I would honestly be interested what the big framework/library players
> actually want/need; do they prefer this implicit scalar type conversion
> system or rather have a rigid system like the current object types but
> for scalars too? I think decision on this RFC should include also
> "their" saying too.
> 
> It's complex because we can't force anyone to participate but I think
> above all these are the most important audience here because they know
> what they want and they know what their users want. I say this because
> usage of object types in PHP is almost non-existent (or, there are just
> too few cases) compared to the architecture of some of the
> framework/library systems out there.

That’s a fair point. I’m not sure how they feel about it.

Their views aren’t necessarily the most important, though. Frameworks can do 
whatever they like, but what ultimately matters is what’s best for the end 
users, who don’t deal with the framework internals.

Thanks.
--
Andrea Faulds
http://ajf.me/





--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to