Re: [PHP-DEV] Inline Lambda Functions

2011-06-29 Thread Martin Scotta
will be for... * multiples arguments * multiples sentences * no return value closures could be kind of wordy but they are very clear about those. Martin Scotta Regards, Stefan

Re: [PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces)

2011-06-29 Thread Martin Scotta
On Wed, Jun 29, 2011 at 5:25 PM, Paul Dragoonis dragoo...@gmail.com wrote: On Wed, Jun 29, 2011 at 9:22 PM, David Zülke david.zue...@bitextender.com wrote: On 29.06.2011, at 22:20, Paul Dragoonis wrote: On Wed, Jun 29, 2011 at 8:49 PM, Ralph Schindler ra...@smashlabs.com wrote:

Re: [PHP-DEV] Variable scopes for language constructs (foreach, ...)

2011-06-23 Thread Martin Scotta
Martin Scotta On Thu, Jun 23, 2011 at 12:09 PM, Ferenc Kovacs tyr...@gmail.com wrote: On Thu, Jun 23, 2011 at 5:03 PM, Stefan Neufeind neufe...@php.net wrote: Hi, I've lately discussed with a colleague which scopes of variables exist for PHP or would probably make sense. In general I

Re: [PHP-DEV] Variable scopes for language constructs (foreach, ...)

2011-06-23 Thread Martin Scotta
Martin Scotta On Thu, Jun 23, 2011 at 12:12 PM, Paul Dragoonis dragoo...@gmail.comwrote: On Thu, Jun 23, 2011 at 4:09 PM, Ferenc Kovacs tyr...@gmail.com wrote: On Thu, Jun 23, 2011 at 5:03 PM, Stefan Neufeind neufe...@php.net wrote: Hi, I've lately discussed with a colleague

Re: [PHP-DEV] Variable scopes for language constructs (foreach, ...)

2011-06-23 Thread Martin Scotta
Martin Scotta On Thu, Jun 23, 2011 at 12:27 PM, Stefan Neufeind neufe...@php.net wrote: On 06/23/2011 05:17 PM, Anthony Ferrara wrote: Personally, I don't care for the concept of a block scope. I do understand that it can have benefits and make certain tasks easier. But it can also

Re: [PHP-DEV] Callable type

2011-06-08 Thread Martin Scotta
Martin Scotta On Wed, Jun 8, 2011 at 5:47 AM, Alexey Shein con...@gmail.com wrote: 2011/6/8 Hannes Magnusson hannes.magnus...@gmail.com: We have the situation in the docs that parameters declared as arrays do not follow the typehinting rules, but parameters as class names do. Re-using

Re: [PHP-DEV] Callable type

2011-06-08 Thread Martin Scotta
Martin Scotta On Wed, Jun 8, 2011 at 10:31 AM, Anthony Ferrara ircmax...@gmail.comwrote: No default values, other then NULL allowed. Otherwise we would need to support array(classname, methodname) too, and then people would want default array values for array typehinting etc etc etc

Re: [PHP-DEV] Bundling modern extensions

2011-06-07 Thread Martin Scotta
Martin Scotta On Tue, Jun 7, 2011 at 10:36 AM, Ferenc Kovacs i...@tyrael.hu wrote: On Tue, Jun 7, 2011 at 3:10 PM, Reindl Harald h.rei...@thelounge.net wrote: Am 07.06.2011 15:08, schrieb Ferenc Kovacs: On Tue, Jun 7, 2011 at 3:04 PM, Reindl Harald h.rei...@thelounge.net wrote

Re: [PHP-DEV] Bundling modern extensions

2011-06-07 Thread Martin Scotta
Martin Scotta On Tue, Jun 7, 2011 at 6:32 AM, David Muir davidkm...@gmail.com wrote: On 07/06/11 15:49, Reindl Harald wrote: Am 07.06.2011 04:42, schrieb Martin Scotta: On Mon, Jun 6, 2011 at 8:15 PM, Reindl Harald h.rei...@thelounge.net wrote: Am 06.06.2011 23:40, schrieb Martin

Re: [PHP-DEV] Implementation help needed: Currying RFC

2011-06-07 Thread Martin Scotta
Martin Scotta On Tue, Jun 7, 2011 at 10:43 AM, John Crenshaw johncrens...@priacta.comwrote: $apos = curry strpos(..., 'a')); $apos(); // runtime error wrong param count? $apos(bar); // fine $apos(bar, foo); // 'a' casted to long, used as offset? $apos(bar, foo, 0

Re: [PHP-DEV] Callable type

2011-06-07 Thread Martin Scotta
callback is callable, the opposite could not be true. a string --or a closure-- is callable, but the string is not a callback IMHO callable fits better. Martin Scotta On Tue, Jun 7, 2011 at 4:28 PM, David Zülke david.zue...@bitextender.comwrote: On 07.06.2011, at 21:12, Stas Malyshev wrote

Re: [PHP-DEV] Bundling modern extensions

2011-06-06 Thread Martin Scotta
Martin Scotta On Mon, Jun 6, 2011 at 2:01 PM, Pierre Joye pierre@gmail.com wrote: On Mon, Jun 6, 2011 at 6:53 PM, Matthew Weier O'Phinney weierophin...@php.net wrote: My point is that perhaps PHP has missed the boat a bit by moving everything into extensions. Perhaps if an extension

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

2011-06-06 Thread Martin Scotta
Martin Scotta On Mon, Jun 6, 2011 at 3:03 PM, Matthew Weier O'Phinney weierophin...@php.net wrote: On 2011-06-01, Sean Coates s...@seancoates.com wrote: Now, the only reason I would personally support the array shortcut is if it was an implementation of JSON. I know that's

Re: [PHP-DEV] Bundling modern extensions

2011-06-06 Thread Martin Scotta
Martin Scotta On Mon, Jun 6, 2011 at 8:15 PM, Reindl Harald h.rei...@thelounge.netwrote: Am 06.06.2011 23:40, schrieb Martin Scotta: It'd be very nice if some extension could be enabled just by dropping the extension file on the path. So developers can check what they have using

Re: [PHP-DEV] Callable typehint

2011-06-06 Thread Martin Scotta
Martin Scotta On Mon, Jun 6, 2011 at 8:02 PM, Stas Malyshev smalys...@sugarcrm.comwrote: Hi! The point, though, is that with such a typehint available, we can reduce boilerplate code like the following: Sure. How about reducing boilterplate code like this: if(is_readable($foo

Re: [PHP-DEV] Voting does not belong on the wiki! (Was: [PHP-DEV] 5.4 moving forward)

2011-06-03 Thread Martin Scotta
Martin Scotta On Fri, Jun 3, 2011 at 5:16 AM, Pierre Joye pierre@gmail.com wrote: hi Derick, On Fri, Jun 3, 2011 at 9:45 AM, Derick Rethans der...@php.net wrote: On Thu, 2 Jun 2011, Stas Malyshev wrote: I'd like to set up a vote for the undecided TODO features on wiki.php.net

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

2011-06-02 Thread Martin Scotta
Could we first go out with fully JSON compatible version for 5.4? and then later decide the = stuff based on how that worked. Native JSON is a big stuff for userland, and I'm pretty sure it will bring a hole of core version upgrades. Martin Scotta On Wed, Jun 1, 2011 at 7:09 PM, Sean Coates s

Re: [PHP-DEV] Fwd: What's up with Quercus?

2011-05-28 Thread Martin Scotta
Martin Scotta On Sat, May 28, 2011 at 11:31 PM, Stas Malyshev smalys...@sugarcrm.comwrote: Hi! annotations have been a central part of the last 100 or so JSRs and I've only seen one or two informed objections, it's fairly obvious the list has had very little experience with Java

Re: [PHP-DEV] Inconsistencies with constructors in SPL

2011-05-17 Thread Martin Scotta
Martin Scotta On Mon, May 16, 2011 at 4:10 PM, Anthony Ferrara ircmax...@gmail.comwrote: Personally, I really don't care for something like this. Would it be caught by a __call declaration if one existed (since it is a call to an undefined method)? Would you expect it to? Although

Re: [PHP-DEV] 5.4 again

2011-05-11 Thread Martin Scotta
Martin Scotta On Wed, May 11, 2011 at 2:18 PM, Arvids Godjuks arvids.godj...@gmail.comwrote: Well, maybe it's time to make some decisions and start to spin the wheels? I's quite obvious that annotations are out for next release until they are a docbook/phpDoc style. Personally I do

Re: [PHP-DEV] annotations again

2011-05-10 Thread Martin Scotta
On Tue, May 10, 2011 at 5:45 AM, Rasmus Lerdorf ras...@lerdorf.com wrote: On 05/10/2011 01:10 AM, Jordi Boggiano wrote: On Tue, May 10, 2011 at 10:02 AM, Lars Schultz To explain what I mean, I'll use the example provided in the RFC. Could anyone please explain the advantages of having

Re: [PHP-DEV] annotations again

2011-05-10 Thread Martin Scotta
Martin Scotta On Tue, May 10, 2011 at 5:02 AM, Lars Schultz lars.schu...@toolpark.comwrote: Am 10.05.2011 09:44, schrieb Ferenc Kovacs: On Tue, May 10, 2011 at 9:01 AM, Chad Fultonchadful...@gmail.com wrote: On Mon, May 9, 2011 at 10:46 PM, Lester Caineles...@lsces.co.uk wrote

Re: [PHP-DEV] 5.4 again

2011-05-09 Thread Martin Scotta
Martin Scotta On Mon, May 9, 2011 at 11:44 AM, guilhermebla...@gmail.com guilhermebla...@gmail.com wrote: Hi, I'd love if you ever discuss these items for 5.4: - ReflectionNamespace Currently it's impossible to grab a docblock that documents an Annotations, for example, or even access

Re: [PHP-DEV] [RFC] Return type-hint

2011-04-29 Thread Martin Scotta
Martin Scotta On Thu, Apr 28, 2011 at 5:15 PM, Peter Lind peter.e.l...@gmail.com wrote: 2011/4/28 Martin Scotta martinsco...@gmail.com: * snip * IMHO I would not trust on any return value, as PHP did not ensure anything about them. Even more, I do not write code that depend

Re: [PHP-DEV] [RFC] Return type-hint

2011-04-28 Thread Martin Scotta
Hey All, I'm really interested on this topic. What would be the result of this? function Foo foo($something) { if ( $something ) { return new Foo; } // no return implies return null } How do you force to return a Type with null allowed? Martin Scotta On Thu, Apr 28

Re: [PHP-DEV] [RFC] Return type-hint

2011-04-28 Thread Martin Scotta
Martin Scotta On Thu, Apr 28, 2011 at 12:58 PM, Ben Schmidt mail_ben_schm...@yahoo.com.au wrote: FWIW, I don't see much point in this either, as far as error reporting is concerned. I think type checking for parameters can provide cheap and useful validation, as parameters passed

Re: [PHP-DEV] [RFC] Return type-hint

2011-04-28 Thread Martin Scotta
Martin Scotta On Thu, Apr 28, 2011 at 2:51 PM, Matt Wilson sha...@gmail.com wrote: Here's my issue: We're borrowing a feature from strongly typed languages and forcing it on a loosely typed language. I'm fine with this, if we're true to the concept. In a regular language, if you type

Re: [PHP-DEV] [RFC] Return type-hint

2011-04-28 Thread Martin Scotta
Martin Scotta 2011/4/28 Johannes Schlüter johan...@schlueters.de On Thu, 2011-04-28 at 20:04 +0200, Ferenc Kovacs wrote: Why I need being saved from documenting my code properly? Anyway, the function code defines the behavior, declaration of return type just ensures function would

Re: [PHP-DEV] Call non-static method staticly raise E_STRICT, but why call a static method instancely won't

2011-04-25 Thread Martin Scotta
Martin Scotta On Mon, Apr 25, 2011 at 4:52 AM, Alessandro Nadalin alessandro.nada...@gmail.com wrote: 2011/4/24 Etienne Kneuss col...@php.net: Hi, On Apr 24 22:13:47, Ángel González wrote: reeze wrote: Hi, I am not sure it's the right place to discuss this. someday I found I

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

2011-04-22 Thread Martin Scotta
what about something like this? $_GET += array( 'key' = 42, 'other' = 'blablah' ); echo $_GET [ 'key' ]; and it's already available on you current instalation :) Martin Scotta On Fri, Apr 22, 2011 at 11:27 PM, Ben Schmidt mail_ben_schm...@yahoo.com.au wrote: On 21/04/11 9:56 AM, Arpad

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

2011-04-14 Thread Martin Scotta
Martin Scotta On Thu, Apr 14, 2011 at 8:58 AM, Ben Schmidt mail_ben_schm...@yahoo.com.auwrote: 1. Suppression of notice. I agree, it is best done only for array keys. It's not hard to initialise a variable with $var=null at the beginning of a code block to avoid such a notice

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

2011-04-14 Thread Martin Scotta
it. With good data abstractions the usage of array_key_exists/isset/empty is barely reduced to the minimum. Martin Scotta On Thu, Apr 14, 2011 at 10:12 AM, Ben Schmidt mail_ben_schm...@yahoo.com.au wrote: There are two issues here. 1. Suppression of notice. I agree, it is best done only for array

Re: [PHP-DEV] proposed access modifier silent ... was: Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator

2011-04-11 Thread Martin Scotta
It seems that there are no consensus about this feature so... *if in doubt, leave it out.* Martin Scotta On Mon, Apr 11, 2011 at 5:09 PM, Chris Stockton chrisstockto...@gmail.comwrote: Hello, On Mon, Apr 11, 2011 at 11:47 AM, Matthew Weier O'Phinney weierophin...@php.net wrote

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

2011-04-08 Thread Martin Scotta
if a variable was already defined is a bad programing habit, these operators will encourage that kind of things In the other hand, the isset check inside the condition ?: would silently improve not-so-well written code, and could be a good feature for the lang. Martin Scotta On Fri, Apr 8, 2011 at 11:27

Re: [PHP-DEV] Adding a more logical string slicing function to PHP

2011-04-02 Thread Martin Scotta
extends these interfaces (private to core) * very very fine type hint * core implementation is not exposed Martin Scotta

Re: [PHP-DEV] Adding a more logical string slicing function to PHP

2011-03-31 Thread Martin Scotta
Martin Scotta On Thu, Mar 31, 2011 at 12:05 PM, Rasmus Lerdorf ras...@lerdorf.com wrote: On 03/31/2011 07:41 AM, Philip Olson wrote: On Mar 30, 2011, at 1:42 PM, Martin Jansen wrote: On 30.03.11 21:36, Dan Birken wrote: As for adding other string functions, I agree, I think

Re: [PHP-DEV] Adding a more logical string slicing function to PHP

2011-03-31 Thread Martin Scotta
on it. Martin Scotta On Thu, Mar 31, 2011 at 12:52 PM, Rasmus Lerdorf ras...@lerdorf.com wrote: On 03/31/2011 08:45 AM, Philip Olson wrote: - Intuitive name Argh! Everyone should be forced to learn a bit of C. Like many PHP functions, the name and argument order is right out of libc. If you

Re: [PHP-DEV] Adding a more logical string slicing function to PHP

2011-03-30 Thread Martin Scotta
or Python... how do you do this in such languages? Martin Scotta On Wed, Mar 30, 2011 at 10:05 AM, Hannes Landeholm landeh...@gmail.comwrote: PHP's substr() is awesome and that comes from a person that code in at least 5 different languages daily. Parsing is a problem in many real-world

[PHP-DEV] application variables

2011-03-16 Thread Martin Scotta
, Martin Scotta

[PHP-DEV] preg_replace does not replace all occurrences

2011-03-14 Thread Martin Scotta
\'' str str \'\' str str \'\' str 'str' \'str\' \'str\' \'str\' Martin Scotta

[PHP-DEV] EOL removed after ?

2011-03-10 Thread Martin Scotta
hi all, pre 1?php ; ?1 22 3?php ; ?3 /pre pre 11?php ; ? 22 33?php ; ? /pre First try works... but second fails output: 1 1 2 2 3 3 1 12 2 3 3 is this the expected behavior? Martin Scotta

Re: [PHP-DEV] Make set_time_limit() timeout a catchable fatal error

2011-03-09 Thread Martin Scotta
... and if they don't catch the error... then die. it would be nice if all errors could be changed into exceptions. Martin Scotta On Wed, Mar 9, 2011 at 10:56 AM, Hannes Landeholm landeh...@gmail.comwrote: I second making time limit reached catchable. All non catchable fatal errors are a problem for me

Re: [PHP-DEV] Class Access Modifiers

2011-03-09 Thread Martin Scotta
that class Priv cannot be used outside A? no, you can always return a reference. namespace A { class F { static function getE() { return new E; } } private class E { } } var_dump( \A\F::getE() ); // object \A\E Martin Scotta On Wed, Mar 9, 2011 at 3:23 PM, Chad Fulton chadful

Re: [PHP-DEV] Class Access Modifiers

2011-03-09 Thread Martin Scotta
On Wed, Mar 9, 2011 at 3:23 PM, Chad Fulton chadful...@gmail.com wrote: Hello, On Wed, Mar 9, 2011 at 10:02 AM, Jarrod Nettles jnett...@inccrra.org wrote: Interesting question. My gut tells me not (as does three years of C# experience). I’m sure that everyone will have a different opinion

Re: [PHP-DEV] Class Access Modifiers

2011-03-03 Thread Martin Scotta
I'm writing a RFC about improvements on the current OO Model. do you want to add this? http://wiki.php.net/rfc/object-model-improvements Martin Scotta On Thu, Mar 3, 2011 at 2:21 PM, Jarrod Nettles jnett...@inccrra.org wrote: Has there been any discussion on access modifiers for classes? I

Re: [PHP-DEV] Re: Clarification on the Enum language structure

2011-02-23 Thread Martin Scotta
Martin Scotta On Wed, Feb 23, 2011 at 7:12 AM, Ben Schmidt mail_ben_schm...@yahoo.com.auwrote: Are you suggesting this as an enum member function, or just a regular function in any old class? Enum member funcion? How much it should be like a class before you call it a class? Exactly

Re: [PHP-DEV] Re: Clarification on the Enum language structure

2011-02-23 Thread Martin Scotta
.. do they fit well? I don't think so $h = new Hydrogen(); // What would mean this? $h = Element::Hydrogen(); // probably with a static method $h = Element::Hydrogen; // class constant? lack of objects support Martin Scotta On Wed, Feb 23, 2011 at 10:49 AM, Alexey Zakhlestin indey...@gmail.comwrote

Re: [PHP-DEV] Re: Clarification on the Enum language structure

2011-02-22 Thread Martin Scotta
whether I answered this clearly. I don't think type hinting is worth the implementation overhead (loss of efficiency) it would require. Ben. Martin Scotta On 23/02/11 1:11 AM, Jarrod Nettles wrote: Apologies - I wasn't suggesting we implement extension methods. I was simply changing my

Re: [PHP-DEV] Re: Clarification on the Enum language structure

2011-02-18 Thread Martin Scotta
MySqlEnum { A_CONSTANT, ANOTHER_ONE; } $foo = MySqlEnum::A_CONSTANT; var_dump( (string) $foo ); // string A_CONSTANT var_dump( MySqlEnum::ANOTHER_ONE === MySqlEnum::fromString('ANOTHER_ONE')); MySqlEnum::getIterator(); // to iterate over the enum elements Martin Scotta On Fri, Feb 18, 2011

Re: [PHP-DEV] Re: Clarification on the Enum language structure

2011-02-17 Thread Martin Scotta
a fully qualified name into the registered autoloaders. /Framework/Web/Mvc/HttpVerbsEnum -Original Message- From: Martin Scotta [mailto:martinsco...@gmail.com] Sent: Monday, February 14, 2011 11:27 AM To: Thomas Gutbier Cc: internals@lists.php.net Subject: Re: [PHP-DEV] Re

Re: [PHP-DEV] Re: Clarification on the Enum language structure

2011-02-14 Thread Martin Scotta
On Mon, Feb 14, 2011 at 12:45 PM, Thomas Gutbier thomas.gutb...@anthrotec.de wrote: Jarrod Nettles wrote: So, my proposed syntax would look something more like this. I think also and was wondering about the current rfc for a few weeks. Im not a core developer but I want to outline what i

Re: [PHP-DEV] [citations for] Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-20 Thread Martin Scotta
Martin Scotta On Wed, Jan 19, 2011 at 9:19 PM, Stas Malyshev smalys...@sugarcrm.comwrote: Hi! Many PHP features should be language constructs, but they were made as language hacks. __construct is evil, as like any other language hack Constructors are standard feature in many

Re: [PHP-DEV] How deep is copy on write?

2011-01-19 Thread Martin Scotta
, $aString) { var_dump($anInteger, $aBool, $aString); } function withObject(ParamOject $o) { var_dump( $o-theInteger(), $o-theBool(), $o-theString() ); } Martin Scotta On Wed, Jan 19, 2011 at 5:03 AM, Hannes Landeholm landeh...@gmail.comwrote: Using references does not speed up PHP

Re: [PHP-DEV] [citations for] Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-19 Thread Martin Scotta
the most experienced programmer could not get it right from the scratch. IMHO, as a simple PHP programmer, the language should provide the simplest language construct and the engine should handle all the complexity under the hood. Martin Scotta On Wed, Jan 19, 2011 at 8:40 AM, Sam Vilain sam.vil

Re: [PHP-DEV] [citations for] Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-19 Thread Martin Scotta
::__construct will not exists. In both cases there were no API changes, only the way the objects are initializated was what changed. My point is that the language does not provide solid fundations (aka language constructs) for systems and libraries to evolve in a safe way. Martin Scotta On Wed, Jan 19

[PHP-DEV] PHP development environment

2011-01-14 Thread Martin Scotta
Hi all, I'm just starting with the internal PHP development. Do you have some sort of common development environment? Eclipse project or the like? I'm using Ubuntu but also have a WXP, just for the sake of. how do you develop PHP ? Martin Scotta

Re: [PHP-DEV] PHP development environment

2011-01-14 Thread Martin Scotta
Yes, my question was about the internal development of PHP. How do you guys develop the core of PHP? Which IDE or text editor do you use? How do you launch the compiler? Are you able to debug the PHP core while it's running some PHP script? Martin Scotta On Fri, Jan 14, 2011 at 11:29 PM

Re: [PHP-DEV] RFC: about class names as values

2011-01-13 Thread Martin Scotta
Hi all, I don't know how the internal development process of PHP works. First at all: was this feature approved? if that is a yes... is this feature going to be scheduled for some release? Is it supposed that I will submit a patch? Thanks you all, Martin Scotta On Sun, Jan 9, 2011 at 11:07

Re: [PHP-DEV] RFC: about class names as values

2011-01-07 Thread Martin Scotta
that 'A\B\C\Foo', but the string comparison will return false Regards, Martin Scotta On Thu, Jan 6, 2011 at 11:47 AM, Michael Morris dmgx.mich...@gmail.comwrote: +1 to this. In a similar vein (and similar reasons) consider ::PARENT as well. Since parent is also a reserved word here too is a case

Re: [PHP-DEV] RFC: about class names as values

2011-01-06 Thread Martin Scotta
for consistency but, as I previously said, I'm not sure about this one. Martin Scotta 2011/1/5 John LeSueur john.lesu...@gmail.com 2011/1/5 Johannes Schlüter johan...@php.net On Wed, 2011-01-05 at 21:53 -0300, Martin Scotta wrote: $obj = newInstance( MyClass ); // notice. undefined

[PHP-DEV] RFC: about class names as values

2011-01-05 Thread Martin Scotta
is using as it today. What do you think about? Martin Scotta