Re: [PHP-DEV] "strict_types" should be renamed "raise_type_error". WAS: About declare(strict_types = 1)

2015-03-16 Thread Matthew Leverton
I don't think your suggestion explains the feature any better than strict_types. (Although the irony of using =1 instead of =true isn't lost on me!) -- Matthew Leverton -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] About declare(strict_types = 1)

2015-03-15 Thread Matthew Leverton
is irrelevant. The type checking mode depends on the file where the function is called." If it were the other way around, then you'd be correct -- it would be a disaster. -- Matthew Leverton -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Voting irregularities

2015-03-15 Thread Matthew Leverton
appeal to this.) 3) In rare cases, Gaming the system - closing the vote at the exact time that benefits the owner of the RFC. So I don't think there's anything sinister here. It's just the natural result of the voting rules. -- Matthew Leverton -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: A plea for unity on scalar types

2015-03-15 Thread Matthew Leverton
work they have put into their proposals. So big thanks to all of you!) -- Matthew Leverton -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [PR] DateTime::createFromImmutable() method

2015-03-09 Thread Matthew Leverton
able::fromInstance($dateTimeImmutable) could just return the same object.) So while not a pressing issue, I do think a more straightforward way of converting would be good because the reality is that you're going to need to do the conversions at some point if you interface with other pe

Re: [PHP-DEV] A different user perspective on scalar type declarations

2015-02-26 Thread Matthew Leverton
e clear, I'd actually be fine with a weak-only implementation that follows the same exact rules as the explicit casts. And I'm okay with strict-mode optionally tacked on top of that -- because it can be useful and won't get in my way. But I'm no longer in favor of any in-between co

Re: [PHP-DEV] [RFC] Anonymous Classes

2015-02-24 Thread Matthew Leverton
ed, maybe $foo would just be a ReflectionClass object. (I haven't really thought that one through...) -- Matthew Leverton -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [VOTE] Scalar Type Hints

2015-02-08 Thread Matthew Leverton
fair IMO is to hold a vote where you rank those four options (weak, strong, both, neither) and hold an instant run-off vote where the first majority wins. And if 'neither' wins, then agree that the topic cannot be revisited until next major version, so that everybody can rest for 5 years. ;) -

Re: [PHP-DEV] [VOTE] Scalar Type Hints

2015-02-08 Thread Matthew Leverton
ed on. Policy states that 2/3s means consensus on core language changes. The current 63.5% isn't too far from that. Just curious, but do you have a different number in mind for this vote? 90%? 80%? -- Matthew Leverton -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe,

Re: [PHP-DEV] [RFC][DISCUSSION] Introduce scrpt_path

2015-02-06 Thread Matthew Leverton
PERDIR setting, then I wouldn't really mind as much. But as PHP_INI_USER, I don't like it at all. -- Matthew Leverton -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC][DISCUSSION] Introduce scrpt_path

2015-02-06 Thread Matthew Leverton
using multiple libraries and they are each overriding their (and your) settings? It just feels messy. The same thing could be accomplished config-less with a callback system that is triggered on script includes (if any callback returns false, an error is thrown), but I think I'd dislike that

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Matthew Leverton
ally works in practice? But a library with type-hints + a script to prepend "use strict" to every PHP file would make testing impact on real-world usage easy for anybody. -- Matthew Leverton -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-01-15 Thread Matthew Leverton
types is far preferred to nothing. There are good arguments on both sides ... let the voters decide. After that, additional RFCs could be created to address raising errors on auto case, using declares to toggle behavior, etc - depending of course on what was decided on prior vote. -- Matthew

Re: [PHP-DEV] [RFC] Scalar Type Hints

2015-01-02 Thread Matthew Leverton
s. Because I wouldn't want to have two different styles of code depending on the library I'm using, I'd end up again going back to assuming everything was a strict type. -- Matthew Leverton -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [VOTE][RFC] Scalar Type Hinting with Cast

2014-09-14 Thread Matthew Leverton
) { } == f( (int) $a); -- with NO notices 2) function f(int $a) {} means $a must be exactly type int -- or recoverable error is thrown 3) current behavior (no scalar type hints) But a new set of rules that require a 23x7 table to describe what's going on ... not a big fan. -- Matthew Le

Re: [PHP-DEV] RFC: Expectations

2013-10-22 Thread Matthew Leverton
l it is to optimize that away to nothing, but it would be more consistent with regard to throwing exceptions and would allow for a variety of different class methods. -- Matthew Leverton On Sun, Oct 20, 2013 at 8:52 PM, Joe Watkins wrote: > On 10/20/2013 12:15 AM, Ferenc Kovacs wrote: >>

Re: [PHP-DEV] [RFC] Keywords as identifiers

2013-09-17 Thread Matthew Leverton
h adds useless overhead. There are a few keywords, such as list and unset, that I often wish I could use in PHP. So in terms of readability, I think any sane programmer would use this proposed functionality for good... -- Matthew Leverton -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Named parameters

2013-09-07 Thread Matthew Leverton
=> 'override'); Now is 'c' overridden or 'd'? So I'll give this issue a rest unless somebody wants to further discuss what the concrete syntax might look like. -- Matthew Leverton -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Named parameters

2013-09-06 Thread Matthew Leverton
On Fri, Sep 6, 2013 at 8:56 PM, Ryan McCue wrote: > Matthew Leverton wrote: > This is already the case. In libraries that accept options via an array, > those array keys are pretty much set in stone (although you can map them > if you need to change a key). > The big differen

Re: [PHP-DEV] [RFC] Named parameters

2013-09-06 Thread Matthew Leverton
eters are set in stone before this feature would go live? So I'm neutral to this proposal, as I would never purposefully build a function that is so convoluted that it needs named parameters, but I understand that's how some people like to write code, and it could be useful in extreme case

Re: [PHP-DEV] Re: crc32() and ip2long() return values

2013-08-30 Thread Matthew Leverton
dismissive of your complaints (because they are valid), I just don't see how two bandaids over specific instances of a larger problem do much good. Although, to be pragmatic, I offered what I feel is a better solution than your extra functions. -- Matthew Leverton -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: crc32() and ip2long() return values

2013-08-30 Thread Matthew Leverton
& current behavior), CRC32_INT32 (always negative if high bit is set), CRC32_UINT32_STRING, CRC32_HEX_STRING Forgive the poor names. -- Matthew Leverton -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Syntax for variadic functions

2013-08-28 Thread Matthew Leverton
ar) I assume that function fn($a, $b = null, ...$c) is possible, and the only way to populate $c is to call fn with three or more parameters. -- Matthew Leverton -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Access-Control-Allow-Origin header in CLI server

2013-07-06 Thread Matthew Leverton
th the powers-to-be doing whatever they feel appropriate. -- Matthew Leverton -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Access-Control-Allow-Origin header in CLI server

2013-07-05 Thread Matthew Leverton
uction web server. -- Matthew Leverton -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Access-Control-Allow-Origin header in CLI server

2013-07-05 Thread Matthew Leverton
. See http://www.red-team-design.com/firefox-doesnt-allow-cross-domain-fonts-by-default The attached patch unconditionally sets it for all static files. Should I submit a bug report, or is this email sufficient to get somebody to look at it? -- Matthew Leverton -- PHP Internals - PHP Runtime Develo