On Thu, Feb 26, 2015 at 2:10 AM, Dmitry Stogov wrote:
> Hi Anthony,
>
> What do you think about using a user level callback for strict type checks
> instead of declare(). It won't allow changing behavior per file, but this
> has its own cons and pros.
>
> set_strict_type_checker(function ($class_
On 26/02/15 11:34, Benjamin Eberlei wrote:
>> You 'll have to think about each file anyway. To add or not to add
>> > declare(strict_types=1).
>> >
> Yes, but It has only exactly one ruleset to keep in mind. With your
> approach the ruleset space is infinite. Much more complex.
Currently the rule
On Thu, Feb 26, 2015 at 2:34 PM, Benjamin Eberlei
wrote:
>
>
> On Thu, Feb 26, 2015 at 12:24 PM, Dmitry Stogov wrote:
>
>>
>>
>> On Thu, Feb 26, 2015 at 2:09 PM, Benjamin Eberlei
>> wrote:
>>
>>>
>>>
>>> On Thu, Feb 26, 2015 at 11:56 AM, Dmitry Stogov wrote:
>>>
On Thu, Feb 26,
On Thu, Feb 26, 2015 at 12:24 PM, Dmitry Stogov wrote:
>
>
> On Thu, Feb 26, 2015 at 2:09 PM, Benjamin Eberlei
> wrote:
>
>>
>>
>> On Thu, Feb 26, 2015 at 11:56 AM, Dmitry Stogov wrote:
>>
>>>
>>>
>>> On Thu, Feb 26, 2015 at 1:34 PM, Benjamin Eberlei
>>> wrote:
>>>
On Thu, Feb 2
On Thu, Feb 26, 2015 at 2:09 PM, Benjamin Eberlei
wrote:
>
>
> On Thu, Feb 26, 2015 at 11:56 AM, Dmitry Stogov wrote:
>
>>
>>
>> On Thu, Feb 26, 2015 at 1:34 PM, Benjamin Eberlei
>> wrote:
>>
>>>
>>>
>>> On Thu, Feb 26, 2015 at 11:10 AM, Dmitry Stogov wrote:
>>>
Hi Anthony,
What
On Thu, Feb 26, 2015 at 1:43 PM, Joe Watkins wrote:
> > The implementation should be simpler and more efficient than using
> declare().
>
> This can't really be correct, if a call to
>
> function mine(int $one, double $two) {
>
> }
>
> results in three function calls then that's going to cost con
On Thu, Feb 26, 2015 at 11:56 AM, Dmitry Stogov wrote:
>
>
> On Thu, Feb 26, 2015 at 1:34 PM, Benjamin Eberlei
> wrote:
>
>>
>>
>> On Thu, Feb 26, 2015 at 11:10 AM, Dmitry Stogov wrote:
>>
>>> Hi Anthony,
>>>
>>> What do you think about using a user level callback for strict type
>>> checks
>>>
On Thu, Feb 26, 2015 at 1:34 PM, Benjamin Eberlei
wrote:
>
>
> On Thu, Feb 26, 2015 at 11:10 AM, Dmitry Stogov wrote:
>
>> Hi Anthony,
>>
>> What do you think about using a user level callback for strict type checks
>> instead of declare(). It won't allow changing behavior per file, but this
>>
> The implementation should be simpler and more efficient than using
declare().
This can't really be correct, if a call to
function mine(int $one, double $two) {
}
results in three function calls then that's going to cost considerably.
I don't like the idea of user function being called, but d
On Thu, Feb 26, 2015 at 11:10 AM, Dmitry Stogov wrote:
> Hi Anthony,
>
> What do you think about using a user level callback for strict type checks
> instead of declare(). It won't allow changing behavior per file, but this
> has its own cons and pros.
>
> set_strict_type_checker(function ($clas
At 10:57 12/08/2010, Daniel Egeberg wrote:
> Everyone who opposes strict typing on grounds that it's an alien
> feature to PHP(*) doesn't see any advantages in this suggestion
Perhaps if you stopped pretending to know everybody's opinion
Suggest you re-read what I said, you didn't seem to unde
2010/8/12 Zeev Suraski :
> At 04:02 12/08/2010, Josh Davis wrote:
>>
>> What would be interesting to see is what people think of Derick's
>> latest proposal allowing both the strict typechecking and the more
>> sensible "weak typing"
>
> Everyone who opposes strict typing on grounds that it's an al
> If there were
> only two options left on earth, strict typing and strict+auto-conversion,
> I'd vote for going with just strict.
Completely agree. I'm against strict approach, but I would prefer
strict to "strict+auto-conversion".
I see a sense in weak typehints. I see a lesser sense in strict.
At 04:02 12/08/2010, Josh Davis wrote:
What would be interesting to see is what people think of Derick's
latest proposal allowing both the strict typechecking and the more
sensible "weak typing"
There's nothing new about it, it's been on the table for around half
a year now. Everyone who oppo
On 2010-08-11, Pierre Joye wrote:
> On Thu, Aug 12, 2010 at 12:11 AM, Zeev Suraski wrote:
> To think that one guy considered that he is allowed to decide to fire
> a 5.4, announce it, all that without a single discussion in the public
> list is really bad. Even worst is that nobody actually even
2010/8/12 Johannes Schlüter :
> Yes, my blog posting reflects my opinion and therefore is manipulative
Indeed. Depending where you'll look, you'll find big communities that
have no clue about or no need for type hinting/checking/casting, some
communities where "strict" typing is heresy, others whe
On Thu, 2010-08-12 at 01:21 +0200, Josh Davis wrote:
> Either way, let me skew your numbers a bit by using Ilia's blog post
> from last year [1] and earlier this year [2]. If that was my only
> benchmark I'd say that there is unanimous support for the
> implementation in current trunk. I guess it s
On 12 August 2010 00:11, Zeev Suraski wrote:
> I'm not sure how long you've been on internals, but I'm not sure there's any
> precedence to such strong and diverse opposition to a feature - amongst both
> core developers, original authors and the community at large.
I don't know, I remember some
On Thu, Aug 12, 2010 at 12:11 AM, Zeev Suraski wrote:
> At 00:58 12/08/2010, Josh Davis wrote:
>>
>> > Now that strict typing is pretty clearly off the table - how would those
>>
>> Wait, what? Clearly off the table?
>
> Yes, clearly off the table.
>
> I'm not sure how long you've been on internal
Daniel,
In order to radically change PHP you need very strong consensus. If
you don't have it, the status quo holds.
Strict typing doesn't have anything remotely close to strong
consensus. It doesn't really matter if a lot of people support it -
there are also plenty of people who oppose i
At 00:58 12/08/2010, Josh Davis wrote:
> Now that strict typing is pretty clearly off the table - how would those
Wait, what? Clearly off the table?
Yes, clearly off the table.
I'm not sure how long you've been on internals, but I'm not sure
there's any precedence to such strong and diverse
On Wed, Aug 11, 2010 at 23:26, Zeev Suraski wrote:
> Now that strict typing is pretty clearly off the table [...]
Did I miss a vote or something? The only thing I've seen is the same
small group of people that has been fighting for the last few months.
Your reasoning seems to be "there are peopl
On 11 August 2010 23:26, Zeev Suraski wrote:
> matter how much I try to explain - it won't help - we probably see things
> too differently for us to ever agree on it. Let's end it by saying that a
> great deal of people here think it's horrible to introduce strict typing to
> PHP period.
Sure, a
At 00:26 12/08/2010, Zeev Suraski wrote:
Moving forward with both is certainly not the only option, I'd say
(given the paragraph above) that it's not an option at all. At the
very least, there's one other option which is doing nothing. And
that's assuming we can't reach widespread consensus t
At 23:59 11/08/2010, Josh Davis wrote:
Not sure what kind of impact we're talking about here. Currently,
there's no scalar type hinting and there will never be a consensus
around strict XOR weak. Having an implementation that allows both
while reusing a familiar syntax (parentheses as a way typec
On 11 August 2010 21:59, Zeev Suraski wrote:
> Consensus about what? About two similar features with slightly different
> syntax being a bad thing? I don't think we need consensus for that. That's
> not up for discussion. It's an axiom for PHP.
Of course it depends on your definition of "simi
On Wed, Aug 11, 2010 at 9:29 PM, Josh Davis wrote:
>
>
> If I'm using type checking as a sanity check then it doesn't work as
> soon as it accepts "1" for an int. The described "weak typehinting" is
> good if you're looking for a way to validate input. However, it does
> not work if you're trying
At 22:54 11/08/2010, Josh Davis wrote:
On 11 August 2010 20:40, Zeev Suraski wrote:
> Josh,
>
> This too (having both options) was debated many times. Read the archives.
I have already read the archives thank you very much. I'm sure you
have too and you remember that there's never been a conse
On 11 August 2010 20:40, Zeev Suraski wrote:
> Josh,
>
> This too (having both options) was debated many times. Read the archives.
I have already read the archives thank you very much. I'm sure you
have too and you remember that there's never been a consensus. I'm
sure that Derick remembers them
On 11 August 2010 19:11, Alexey Zakhlestin wrote:
> Did you read second RFC? The one which is about "so called" weak typehinting.
> Stas (and a lot of people on this list) prefer it.
> http://wiki.php.net/rfc/typecheckingstrictandweak
Yes of course, but reposting that link is a good idea. :)
> I
Josh,
This too (having both options) was debated many times. Read the archives.
Short version? Strict typing is evil. The only thing that's even
worse? Adding both Strict typing and something else. Why? You get
everything that's bad about strict typing, combined with the added
confusion
On 11 August 2010 19:20, Stas Malyshev wrote:
> I'm against it on sanity and logic grounds. I explained the reasons (for the
> Nth time) above. If you still can't comprehend that there's logic behind
> what I am saying and call it "ideology" - well, I guess there's a limit of
> what one can explai
Hi!
Yeah, hmm, no, and it is disingenuous of you to equate type hints to
PHP becoming statically typed. I'm sure that some people would love to
See? That's exactly why I am so opposed to calling it "type hints".
Because if you called it proper name - strict typing, you'd say "it is
disingenu
On Wed, Aug 11, 2010 at 8:56 PM, Josh Davis wrote:
> On 11 August 2010 08:23, Stas Malyshev wrote:
>
>>> I very much can, it's just not my intention. I want to be able to use
>>> type hinting/type checking as a sanity check. If I write a method
>>> whose signature is foo(int $n) I signal my inten
On 11 August 2010 08:23, Stas Malyshev wrote:
>> I very much can, it's just not my intention. I want to be able to use
>> type hinting/type checking as a sanity check. If I write a method
>> whose signature is foo(int $n) I signal my intention to only accept
>
> Then you should use statically typ
> anyway .. for the love of god, could be please stop arguing in circles,
> nothing .. really nothing that people brought forth pro/con any approach in
> regards to type checking/hinting whatever hasn't been mentioned on this list
> multiple times.
+1
> please please please please .. read the
On 11 Aug 2010, at 17:01, Elizabeth M Smith wrote:
> Well this is turning into a real flamefest.
I'm now totally confused to be honest.
> Personally I really HATE the 5.3 implementation of "typehints" - heck you
> can't even typehint arrays with an arrayobject instance, it's not hinting in
>
On Wed, 11 Aug 2010 16:03:14 +0100, Alexey Zakhlestin
wrote:
2010/8/11 Ryan Panning :
Because the current syntax used for type hinting
classes/arrays is strict. If changed, you would need to specify that
scaler
types are weak but classnames are strict and now you have a WTH moment.
Not
On 11 Aug 2010, at 15:13, Zeev Suraski wrote:
> Maybe I'm old school, but in my opinion, trunk should only contain
> agreed-upon features. It should also always build and pass tests
> successfully. It's not the wild-west version of PHP, it's PHP's next
> version, in progress. Want to work o
Hi Elizabeth
2010/8/11 Elizabeth M Smith :
> Well this is turning into a real flamefest.
>
> Personally I really HATE the 5.3 implementation of "typehints" - heck you
> can't even typehint arrays with an arrayobject instance, it's not hinting in
> any way shape or form and is generally broken.
>
>
Well this is turning into a real flamefest.
Personally I really HATE the 5.3 implementation of "typehints" - heck
you can't even typehint arrays with an arrayobject instance, it's not
hinting in any way shape or form and is generally broken.
On the other hand I'd like to be able to have the s
Johannes Schlüter wrote:
Good that this discussion happens in a secret place on a list no
"community" members can see.
Oh wait. It doesn't. Oh and wait we let users participate!
And "we know best" - well part of this is that for doing the discussion
in a sane way you need some minimum knowledge
On Wed, 2010-08-11 at 10:17 -0500, Ryan Panning wrote:
> One other comment I forgot with my original post:
> Why not leave the choice (strict/weak) up to the end users by
> implementing both using the syntax I commented about? Is one way or
> the
> other so bad that it can't be implemented?
Yes
On Wed, 2010-08-11 at 09:55 -0500, Ryan Panning wrote:
> IMO some of these debates should be brought to the end
> users. Who uses PHP in the end? The users. (And yes, I know the devs
> here do to..) What is one thing most companies go by? The customers
> come first. This "we know best" attitude h
Lukas Kahwe Smith wrote:
...
anyway .. for the love of god, could be please stop arguing in circles, nothing
.. really nothing that people brought forth pro/con any approach in regards to
type checking/hinting whatever hasn't been mentioned on this list multiple
times.
...
I agree with you
On 11.08.2010, at 16:55, Ryan Panning wrote:
> Now, changing the current implementation to "weak type hinting" would be more
> confusing. Because the current syntax used for type hinting classes/arrays is
> strict. If changed, you would need to specify that scaler types are weak but
> classnam
2010/8/11 Ryan Panning :
> Because the current syntax used for type hinting
> classes/arrays is strict. If changed, you would need to specify that scaler
> types are weak but classnames are strict and now you have a WTH moment.
Not really. Class type-hinting is not strict. The only reason why it
Victor Bolshov wrote:
Having two similar syntaxes that work differently - would make the
situation even worse that it is now - I beleive. And I totally agree
with Rasmus - strict typed language mustnt be called PHP. (Just a poor
user's notice to all of you internals' geeks out there)
2010/8/11 S
On 11 August 2010 15:13, Zeev Suraski wrote:
> At 15:14 11/08/2010, Richard Quadling wrote:
>>
>> On 11 August 2010 12:10, Zeev Suraski wrote:
>> > We need to remove strict typing from trunk before we release anything
>> > 'official' from php.net
>>
>> I thought "trunk" is, to some degree, the "w
On 11.08.2010, at 16:13, Zeev Suraski wrote:
> Maybe I'm old school, but in my opinion, trunk should only contain
> agreed-upon features. It should also always build and pass tests
> successfully. It's not the wild-west version of PHP, it's PHP's next
> version, in progress. Want to work on
At 15:14 11/08/2010, Richard Quadling wrote:
On 11 August 2010 12:10, Zeev Suraski wrote:
> We need to remove strict typing from trunk before we release anything
> 'official' from php.net
I thought "trunk" is, to some degree, the "work in progress" /
"developers only", YMMV branch. Pretty much
On 8/11/10 1:03 AM, Zeev Suraski wrote:
We've also had quite a lengthy discussion on this topic, and there
was more support for 'weak' typing then there was for strict typing.
Yes, I would like to restate the obvious from my email in May:
Really, I am confused what the argument is about. We a
Sommer Nielsen; Internals;
> Derick Rethans
> Subject: Re: [PHP-DEV] Strict typing (was: Typehints)
>
> I think that weak type-hinting defeats the whole purpose of the feature and I
> would rather not have it than have a non-obvious implementation.
>
> -1
>
> On Wed, Aug 11
hans
> Subject: Re: [PHP-DEV] Strict typing (was: Typehints)
>
>
> On 11.08.2010, at 14:14, Richard Quadling wrote:
>
> > So, the trunk keeps strict typing.
> >
> no .. a controversial patch like this should never have gotten into trunk
> without a vote. the only pl
2010/8/11 Ilia Alshanetsky :
> I think that weak type-hinting defeats the whole purpose of the
> feature and I would rather not have it than have a non-obvious
> implementation.
>
> -1
>
I would like to point out an argument, posted in the "Typehints (was
Re: [PHP-DEV] Annoucing PHP 5.4 Alpha 1)"
On 11.08.2010, at 14:14, Richard Quadling wrote:
> So, the trunk keeps strict typing.
no .. a controversial patch like this should never have gotten into trunk
without a vote. the only place for this patch in the svn.php.net repo would be
a feature branch.
regards,
Lukas Kahwe Smith
m...@poo
On 11 August 2010 12:10, Zeev Suraski wrote:
> We need to remove strict typing from trunk before we release anything
> 'official' from php.net
I thought "trunk" is, to some degree, the "work in progress" /
"developers only", YMMV branch. Pretty much anything/everything in
there is subject to chan
That's not the issue on the table now.
We need to remove strict typing from trunk before we release anything
'official' from php.net, and the sooner the better. It's clearly not
something there's consensus over, almost the opposite.
We should discuss the merits of auto-converting type hints
On 11.08.2010, at 10:53, Pierre Joye wrote:
> On Wed, Aug 11, 2010 at 8:03 AM, Zeev Suraski wrote:
>
>> Facts:
>
> There are two facts that matter right now, imo:
>
> - There is no 5.4 or whatever other version as of now.
> - There is no RM either.
>
> I don't know why nobody cares (well I d
I think that weak type-hinting defeats the whole purpose of the
feature and I would rather not have it than have a non-obvious
implementation.
-1
On Wed, Aug 11, 2010 at 2:03 AM, Zeev Suraski wrote:
> At 01:47 11/08/2010, Stas Malyshev wrote:
>>
>> Hi!
>>
>>> For the record: I consider the curre
On Wed, Aug 11, 2010 at 8:03 AM, Zeev Suraski wrote:
> Facts:
There are two facts that matter right now, imo:
- There is no 5.4 or whatever other version as of now.
- There is no RM either.
I don't know why nobody cares (well I do ;), but this is totally
insane. Do we ever learn? PHP6, the las
Hi,
why are we discussing this again?
get the RFC's fixed up (though I would assume by now they are already) and do a
vote and of story
without a vote the status quo from the last release should be maintained for
such a controversial feature, aka if there is no consensus then the strict type
ch
+1. Strict typing will only prevent PHP from being itself, while not
providing the advantages of a real statically types language (as Stas
Malyshev has mentioned in another thread of discussion).
2010/8/11 Arvids Godjuks :
> Completly agree with Zeev, most russian comunity is for the weak type
> h
Completly agree with Zeev, most russian comunity is for the weak type
hinting. Many would like strict, but most of the pro strict type
hinters understand that PHP and strict type hinting not match and vote
for type hints with auto converting.
--
PHP Internals - PHP Runtime Development Mailing Lis
Hi!
I'm sorry but I have no idea what you're talking about there =\ PHP
has a bunch of different types, the current type hinting (typechecking
"int" is a different kind of type from Zend_Controller_Factory and
SimpleXML - the same kind of types are "int" and "object". The former
are engine t
Zeev Suraski wrote:
Strict typing should go away before any 'official' package comes out of
php.net.
+1 from me as well.
And it is nice to hear that I'm not on my own in that ...
--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Ele
On Wed, Aug 11, 2010 at 2:03 AM, Zeev Suraski wrote:
> At 01:47 11/08/2010, Stas Malyshev wrote:
>
>> Hi!
>>
>> For the record: I consider the current implementation as (one of) the
>>> biggest mistakes in the last ten years.
>>>
>>
>> I agree completely. The fact that obvious absence of consens
At 01:47 11/08/2010, Stas Malyshev wrote:
Hi!
For the record: I consider the current implementation as (one of) the
biggest mistakes in the last ten years.
I agree completely. The fact that obvious absence of consensus is
ignored and we are releasing feature that clearly has no consensus
be
On 10-08-11 12:03 AM, Josh Davis wrote:
On 11 August 2010 02:50, Stas Malyshev wrote:
Hi!
First of all, I am talking about the typehinting syntax and mechanism
here. As Derick pointed out, current typehints are strict.
Talking about "strict" vs. "non-strict" for class types is meaningless.
On 11 August 2010 02:50, Stas Malyshev wrote:
> Hi!
>
>> First of all, I am talking about the typehinting syntax and mechanism
>> here. As Derick pointed out, current typehints are strict.
>
> Talking about "strict" vs. "non-strict" for class types is meaningless.
By "strict" typehints I meant th
Sounds like a reasonable name change. PHP never really had
"type-hinting" since even array or Object type "hints" would throw out
any value that didn't precisely match the requested type by the
method/function declaration.
On Tue, Aug 10, 2010 at 8:53 PM, Stas Malyshev wrote:
> Hi!
>
>> Might be
Hi!
Might be the time to rename what we currently call "type hinting" then.
Because what we currently have is strict typing as well.
Maybe. The term "hint" was inexact from the start, as hint means
(Collins English Dictionary):
1. a suggestion or implication given in an indirect or subtle m
Hi!
First of all, I am talking about the typehinting syntax and mechanism
here. As Derick pointed out, current typehints are strict.
Talking about "strict" vs. "non-strict" for class types is meaningless.
You can consider them non-strict if you want - they convert if the
conversion is availa
Having two similar syntaxes that work differently - would make the
situation even worse that it is now - I beleive. And I totally agree
with Rasmus - strict typed language mustnt be called PHP. (Just a poor
user's notice to all of you internals' geeks out there)
2010/8/11 Stas Malyshev :
> Hi!
>
>
Hi!
1. right now we *have* strict type checks for classes and arrays in the
form of "classname" or "array"
Because classes and arrays were never intechangeable types and there was
never implicit or explicit conversion between SplRecursiveTreeIterator
and Zend_Pdf_Generator - it doesn't e
75 matches
Mail list logo