Re: [PHP-DEV] Make try/catch brackets optinal

2012-07-19 Thread Rune Kaagaard
+1 for the consistency of it. It's surprising that: if ($foo) return $bar; else return 42; works and: try maybe_dangerous(); catch(Dynamite $e) handle_error(); does not. On Thu, Jul 19, 2012 at 12:11 PM, Peter Beverloo pe...@lvp-media.com wrote:

Re: [PHP-DEV] Re: is_a() - again - a better fix

2011-09-22 Thread Rune Kaagaard
Wearing my package maintainer hat and given that Alan's points above are true, I would very much like for is_a's behaviour to be reverted to pre-5.3.8 state as well. I also believe that reverting would cause less damage than keeping current behaviour. The hugest of +1's! -- PHP Internals -

Re: [PHP-DEV] Re: $arr = array('Hello', 'world'); $arr();

2011-07-14 Thread Rune Kaagaard
Will this work: array('foo', 'bar')('arg1', 'arg2') ? On Wed, Jun 8, 2011 at 3:48 PM, Christian Kaps christian.k...@mohiva.com wrote: On Wed, 8 Jun 2011 15:39:59 +0200, Jordi Boggiano wrote: On Wed, Jun 8, 2011 at 2:46 PM, Felipe Pena felipe...@gmail.com wrote: class foo {   public

Re: [PHP-DEV] Bundling modern extensions

2011-06-10 Thread Rune Kaagaard
On Fri, Jun 10, 2011 at 12:50 PM, Lars Strojny l...@strojny.net wrote: Please change your tone. +1! -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] autoconf 2.60+ support

2011-06-03 Thread Rune Kaagaard
I compiled trunk on Ubuntu 11.04 desktop yesterday with default settings and was surprised and confused when it worked even after I forgot to use the older autoconf binary. Nice job! -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [PATCH] Notice on array to string convertion

2011-06-02 Thread Rune Kaagaard
this conversion should never happen and throw a fatal error since this action is destructive to data and never useful nor will warnings/notices helps in the real world Unlike i.e. Python its really not the PHP way to go fatal on the developer during weird type conversions. I'm also +1 on the

Re: [PHP-DEV] [PATCH] Notice on array to string convertion

2011-06-02 Thread Rune Kaagaard
Am 02.06.2011 14:56, schrieb Rune Kaagaard: this conversion should never happen and throw a fatal error since this action is destructive to data and never useful nor will warnings/notices helps in the real world I agree totally that such a conversion should never happen. If we could redesign

Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-06-01 Thread Rune Kaagaard
Big +1 on the patch. The : although a better choice would be asymmetric to how its done inside array(). On Wed, Jun 1, 2011 at 11:50 AM, dukeofgaming dukeofgam...@gmail.com wrote: After that argument, I think I'm against : now too. +1 to = Could { } be implemented for objects too then?.

Re: [PHP-DEV] Re: Is it true that short_open_tag is deprecated in PHP 6?

2011-05-19 Thread Rune Kaagaard
I don't think this problems calls for a more flexible solution. On the other hand I think the flexibility _is_ the problem. Today if I want to write compatible php code I can neither use: ?foreach($rows as $row):? ... or ?xml ... in my template files. Bummer! :) I would much prefer that

Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator

2011-04-10 Thread Rune Kaagaard
Hey again Updated here as always https://gist.github.com/909711. I've tried to write down the goal of this new feature. Which patterns do we want to make easier to write? Do you agree with the goals I've set? +1 From me of course :) Also added a proposal that would make userland

Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator

2011-04-09 Thread Rune Kaagaard
Hi guys Below is a discussion about some of the issues being raised. Again a nicely formatted version of the whole thing is here: https://gist.github.com/909711. ## Discussion ## ### About changing the beviour of the ternary shortcut ### @Jordi, others Some suggest adding an implicit `isset`

Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator

2011-04-08 Thread Rune Kaagaard
Dear Internals I'm very happy that this is getting some attention again. Please allow me to give my 2 cents too. The text below can also be seen nicely formatted at https://gist.github.com/909711. ## Intro ## Isset and IsNotEmpty operators have for sure been a hot topic for several years now

Re: [PHP-DEV] Re: EBNF

2011-01-04 Thread Rune Kaagaard
Having an EBNF would be useful in cases where we want to write something like Ruby's CoffeeScript. After looking at PHP's grammar file, it's about 1,000 lines long. Since this is used to generate the parser, isn't it possible to strip out the C macros to create an EBNF that catches all edge

Re: [PHP-DEV] Re: EBNF

2011-01-02 Thread Rune Kaagaard
{, SimpleArgumentDeclaration} SimpleArgumentDeclaration ::= [TypeHint] Variable [= Literal] TypeHint ::= ArrayTypeHint | FullyQualifiedClassIdentifier ArrayTypeHint ::= array Now it is easy to continue the work and add missing rules. =) Cheers, On Sat, Jan 1, 2011 at 12:46 PM, Rune Kaagaard rumi

[PHP-DEV] Re: EBNF

2011-01-01 Thread Rune Kaagaard
There has never been a language grammar, so there's been nothing to refer to at all. As for why no one's made one more recently, for fun I snagged the .l and .y files from trunk and W3C's version of EBNF from XML. In two hours of hacking away, I managed to come up with this sort-of

[PHP-DEV] Re: EBNF

2010-12-31 Thread Rune Kaagaard
have to ask if I'm the only one thinking about this or is there something I'm being completely ignorant about? Happy newyear! Rune Kaagaard -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Obscure token name

2010-04-27 Thread Rune Kaagaard
You can pry T_PAAMAYIM_NEKUDOTAYIM from my cold dead fingers! On 4/27/10, mathieu.suen mathieu.s...@easyflirt.com wrote: OMG More than 100 token I am pretty sure that more than 50% are syntactic sugar. Davey Shafik wrote: From the manual: T_PAAMAYIM_NEKUDOTAYIM :: ::. Also

Re: [PHP-DEV] Hacking language syntax

2010-03-06 Thread Rune Kaagaard
The files you want to change in PHP core are the lexer (http://code.google.com/p/php-alternative-syntax/source/browse/trunk/php-5.3.0/Zend/zend_language_scanner.l) and the scanner (http://code.google.com/p/php-alternative-syntax/source/browse/trunk/php-5.3.0/Zend/zend_language_parser.y) and then

[PHP-DEV] Re: Creating an experimental syntax

2009-10-17 Thread Rune Kaagaard
baffles me. I changed the return keyword to -, and I would like to automatically add a return on the last line of a function. So that the following PHP code: ?php function foo() { $x = 2; $x * 2; } ? would return an int with a value of 4. How should I attack this problem? Thx a lot! Rune Kaagaard

[PHP-DEV] Re: Creating an experimental syntax

2009-10-14 Thread Rune Kaagaard
method to attack the problem I would be very grateful! Cheers Rune Kaagaard Denmark -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Creating an experimental syntax

2009-10-14 Thread Rune Kaagaard
Dear Etienne Wauw did not know Backus–Naur Form before. That looks like a great first step. Thx for showing me that! Cheers Rune Kaagaard Denmark On 10/14/09, Etienne Kneuss col...@php.net wrote: Hello, On Wed, Oct 14, 2009 at 1:37 PM, Etienne Kneuss col...@php.net wrote: Hello, one

[PHP-DEV] Re: Creating an experimental syntax

2009-10-14 Thread Rune Kaagaard
Dear Etienne Wauw did not know Backus–Naur Form before. That looks like a great first step. Thx for showing me that! Cheers Rune Kaagaard Denmark -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: Creating an experimental syntax

2009-10-12 Thread Rune Kaagaard
line function declaration without the '{}'. Example: def double($x) = return 2 * $x; I cant seem to find out what token to use for a new line? Any thoughts? Thx a lot from confused guy Rune Kaagaard Denmark -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http

[PHP-DEV] Re: Creating an experimental syntax

2009-10-10 Thread Rune Kaagaard
realised all of a sudden that I really don't understand anything about what is going on in these files. Not even enough to ask good questions. What should I do/read/study/buy/etc... Thx in advance from a very confused dude that is in way over his head Rune Kaagaard Denmark -- PHP Internals