Re: [PHP-DEV] Implementing Generics, and none scalar default properties.

2016-01-07 Thread Ben Scholzen 'DASPRiD'
, because the intention is to allow it to be overridden, but it must be called by the child impl at some point. What do u think? -- Ben Scholzen 'DASPRiD' Community Review Team Member | m...@dasprids.de Zend Framework | http://www.dasprids.de -- PHP Internals - PHP Runtime D

Re: [PHP-DEV] Something|null return type declaration

2015-12-03 Thread Ben Scholzen 'DASPRiD'
know, there was a general consent against a simple nullable hint. -- Ben Scholzen 'DASPRiD' Community Review Team Member | m...@dasprids.de Zend Framework | http://www.dasprids.de -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Resource typehint and return type

2015-11-23 Thread Ben Scholzen 'DASPRiD'
the plain functions? I'd say that when fclose() was called on an SplFileObject and e.g. an fwrite(), fread() or the like call is made on the object, it throw's an exception? -- Ben Scholzen 'DASPRiD' Community Review Team Member | m...@dasprids.de Zend Framework

Re: [PHP-DEV] Re: Resource typehint and return type

2015-11-22 Thread Ben Scholzen 'DASPRiD'
much... Bob I just looked at this again, and I don't know how I could miss this for so long, but we already have SplFileObject. Wouldn't it make sense to let fopen() and complementary functions use that? -- Ben Scholzen 'DASPRiD' Community Review Team Member | m...@d

Re: [PHP-DEV] Re: Resource typehint and return type

2015-11-10 Thread Ben Scholzen 'DASPRiD'
open() function)? -- Ben Scholzen 'DASPRiD' Community Review Team Member | m...@dasprids.de Zend Framework | http://www.dasprids.de -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Resource typehint and return type

2015-11-10 Thread Ben Scholzen 'DASPRiD'
Hi guys, I just poked up an RFC and a patch for resource typehints and return types. I'd really like to hear your thoughts about it! RFC: https://wiki.php.net/rfc/resource_typehint Patch: https://github.com/php/php-src/pull/1631 Cheers, -- Ben Scholzen 'DASPRiD' Community Rev

Re: [PHP-DEV] New function proposal

2015-10-09 Thread Ben Scholzen 'DASPRiD'
r_die($var)" functionallity. My mates and i use a lot var_dump($var);die; Since die() wont print an array just a string, i think it´ll be very useful. It should do the var_dump($var);and die(); what do you think? -- Ben Scholzen 'DASPRiD' Community Review Team Member | m...@d

Re: [PHP-DEV] [RFC] [DISCUSSION]: Closure from callable

2015-10-04 Thread Ben Scholzen 'DASPRiD'
o this: return function ($data) { return $this->genericValidation($data); } and keep the actual callback method private/protected. -- Ben Scholzen 'DASPRiD' Community Review Team Member | m...@dasprids.de Zend Framework | http://www.dasprids.de -- PHP Internals - PHP Runtime

[PHP-DEV] Re: Implementing Generics, and none scalar default properties.

2015-09-23 Thread Ben Scholzen 'DASPRiD'
interesting" issue I didn't think about when writing up the RFC. Sadly, I have no idea about how to solve this issue. If you have no idea either on how to solve this, I'd suggest to skip generic methods for now and concentrate on generic classes only. -- Ben Scholzen 'DAS

Re: [PHP-DEV] Implementing Generics, and none scalar default properties.

2015-09-23 Thread Ben Scholzen 'DASPRiD'
So far I only wrote up the RFC and kicked off a discussion here on the mailing list about it. As I wrote several times already, I'd appreciate someone tackling the implementation side to get a patch working! Cheers, -- Ben Scholzen 'DASPRiD' Community Review Team Member | m...@d

Re: [PHP-DEV] Let's discuss enums!

2015-09-17 Thread Ben Scholzen
worth, there's SplEnum ;) -- Ben Scholzen http://www.dasprids.de smime.p7s Description: S/MIME Cryptographic Signature

Re: [PHP-DEV] Generic classes and methods RFC

2015-09-11 Thread Ben Scholzen
ethod, you would enforce that the user has to define them for static method calls which don't require a type at all (helper methods for instance). -- Ben Scholzen http://www.dasprids.de smime.p7s Description: S/MIME Cryptographic Signature

Re: [PHP-DEV] Generic classes and methods RFC

2015-09-11 Thread Ben Scholzen
a-generic-class [2] https://docs.oracle.com/javase/tutorial/extra/generics/methods.html On Fri, Sep 11, 2015 at 8:28 AM Levi Morrison wrote: On Thu, Sep 10, 2015 at 5:12 PM, Ben Scholzen 'DASPRiD' wrote: Hi Dennis, thanks for your feedback, see my answers below: 1. static methods:

Re: [PHP-DEV] Generic classes and methods RFC

2015-09-10 Thread Ben Scholzen 'DASPRiD'
f the PHP core, and I'd leave it up to someone else to suggest the best way to implement it. But the idea of template classes sounds like a solution I'd probably chose if I didn't know better… which I don't :) Again, thanks for your feedback! -- Ben Scholzen 'DASPRiD'

Re: [PHP-DEV] Re: Generic classes and methods RFC

2015-09-10 Thread Ben Scholzen
. I think adding a comma between "where" expressions is a little redundant; I'd leave it out like in C#. -- Stephen I like the "where" syntax as well, as it really fits into the PHP syntax way. I think I should update the RFC accordingly. -- Ben Scholzen http://www.dasprids

Re: [PHP-DEV] Re: Generic classes and methods RFC

2015-09-07 Thread Ben Scholzen
y-gritty of implementing it. It's great that you've got an RFC written for this, but unless someone is willing to implement it, I fear it may go to waste. But you writing an RFC might inspire someone. There is hope! I hope so as well! Hope my thoughts are somewhat helpful. -- Andrea Faulds http://ajf.me/ -- Ben Scholzen http://www.dasprids.de smime.p7s Description: S/MIME Cryptographic Signature

Re: [PHP-DEV] Generic classes and methods RFC

2015-09-07 Thread Ben Scholzen
he user context. I'm interested to see if PHP can get generics going. I hope hashing out some more details might garner more interest. Thanks, John -- Ben Scholzen http://www.dasprids.de smime.p7s Description: S/MIME Cryptographic Signature

Re: [PHP-DEV] Generic classes and methods RFC

2015-09-07 Thread Ben Scholzen
sume that it should not have a negative performance effect on code which doesn't use generics. I hope this RFC will have positive comments, and someone who is capable of writing C will help you out with it so there's a patch for people to review - because I'm not sure if this RFC c

[PHP-DEV] Generic classes and methods RFC

2015-08-31 Thread Ben Scholzen 'DASPRiD'
Hello, I've written up an RFC for supporting generic classes and methods in PHP, and I'd love to hear your thoughts about it. https://wiki.php.net/rfc/generics Cheers, -- Ben Scholzen 'DASPRiD' Community Review Team Member | m...@dasprids.de Zend Framework

Re: [PHP-DEV] Re: RFC: Replacing errors with Exceptions

2009-08-08 Thread Ben Scholzen 'DASPRiD'
Hannes Magnusson wrote on 30.07.2009 10:48: > Are you intentionally ignoring what I've said previously in the thread? > Please stop using SimpleXML as an example. You do not need @. > libxml_use_internal_errors(true); > $sxe = simplexml_load_string(""); > if (!$sxe) { > echo "Failed loading XML\

Re: [PHP-DEV] Re: RFC: Replacing errors with Exceptions

2009-08-05 Thread Ben Scholzen 'DASPRiD'
Hannes Magnusson wrote on 31.07.2009 11:35: > I'll add some "see also" links and add an "errors" section mentioning it too. > > -Hannes Same for XMLReader then, please. -- ... : ___ _ ___ ___ ___ _ ___: : | \ /_\ / __| _ \ _ (_) \ : : | |) / _ \\__

Re: [PHP-DEV] RFC: Replacing errors with Exceptions

2009-07-24 Thread Ben Scholzen 'DASPRiD'
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kalle Sommer Nielsen wrote: > Then ZF should provide an error handler that can be called inside the > user's error handler or simply choose to not use error handlers if the > user have a custom error handler. I can't really see why the whole > language

Re: [PHP-DEV] RFC: Replacing errors with Exceptions

2009-07-24 Thread Ben Scholzen 'DASPRiD'
To you both, this is especially, for library code like Zend Framework. The library cannot expect the user to have the error handle set, so it would have to replace the error handler before every line which it wants to try {} and reset it after the catch. This is not really a clean solution, at it c