Hey, developers. This week - tomorrow, 2100 UTC on Wednesday - we'll be talking about Andrew Green's "Typesafe enums" proposal https://www.mediawiki.org/wiki/Requests_for_comment/Typesafe_enums , and looking to finish off the next step of C. Scott Ananian's "Square bounding boxes" RfC. https://www.mediawiki.org/wiki/Requests_for_comment/Square_bounding_boxes
We'll be in #wikimedia-office - for YOUR time, try this: http://everytimezone.com/#2014-5-21,540,6bj
Meeting page: https://www.mediawiki.org/wiki/Architecture_meetings/RFC_review_2014-05-21
Next week we will probably be talking about Pau Giner's grid system RfC https://www.mediawiki.org/wiki/Requests_for_comment/Grid_system and about extension management, probably on Monday the 26th and probably at a time better for Australia and Asia.
Le 21/05/2014 00:32, Sumana Harihareswara a écrit :
we'll be talking about Andrew Green's "Typesafe enums" proposal
https://www.mediawiki.org/wiki/Requests_for_comment/Typesafe_enums
Hello,
I will not be able to attend, but have a minor concern. The Typesafe enums RFC mentions PHP build in [SplEnum] class and dismiss it because it is unintuitive.
Before reinventing the wheel, it would be nice to elaborate a bit more as to why SplEnum is unwanted. I am afraid of having to maintain yet another piece of custom code and make the MediaWiki learning curve slightly worth.
Ideally we would work with upstream to enhance it and match our needs but I guess it is going to take too long (ie years before it land in production).
[SplEnum] http://www.php.net/manual/en/class.splenum.php
cheers,
From my read, SplEnum is a bit janky -- you still have to defibe integer
constants and may have to pass them in.
The proposal here is more "php-natural" in that you can say Month::$JANUARY similarly to how you'd use Month::JANUARY, whereas SplEnum recommends the more verbose new Month(Month::JANUARY) or such.
You could still do that with SplEnum though by adding the properties, but SplEnum doesn't look like a really fancy wheel; there might not be any benefit to using it if we're just going to use it differently.
-- brion On May 21, 2014 2:53 AM, "Antoine Musso" hashar+wmf@free.fr wrote:
Le 21/05/2014 00:32, Sumana Harihareswara a écrit :
we'll be talking about Andrew Green's "Typesafe enums" proposal
https://www.mediawiki.org/wiki/Requests_for_comment/Typesafe_enums
Hello,
I will not be able to attend, but have a minor concern. The Typesafe enums RFC mentions PHP build in [SplEnum] class and dismiss it because it is unintuitive.
Before reinventing the wheel, it would be nice to elaborate a bit more as to why SplEnum is unwanted. I am afraid of having to maintain yet another piece of custom code and make the MediaWiki learning curve slightly worth.
Ideally we would work with upstream to enhance it and match our needs but I guess it is going to take too long (ie years before it land in production).
[SplEnum] http://www.php.net/manual/en/class.splenum.php
cheers,
-- Antoine "hashar" Musso
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
I gave SplEnum a quick read as well. It seems they are solving a different use case. SplEnum appears to be optimized for the case where you have some inherently-integer constants floating around your code (due to legacy or interoperation with C or network protocols or what-have-you), and you want to give them prettier names while facilitating safe conversion between the integers and the fancy names.
For example, with SplEnum I can do:
new HttpStatus($status)
and it will throw an exception if $status isn't a valid http status code, otherwise it will give me HttpStatus::FOUR_OH_FOUR or what have you.
The proposed MW enumeration class is when you don't want to think of your enumerated types as integers at all. --scott
On 05/21/2014 02:22 PM, C. Scott Ananian wrote:
I gave SplEnum a quick read as well. It seems they are solving a different use case. SplEnum appears to be optimized for the case where you have some inherently-integer constants floating around your code (due to legacy or interoperation with C or network protocols or what-have-you),
Which we do (with an emphasis on the 'legacy' one), so maybe we should have both, or include support for this use case in our implementation.
I haven't looked at it in detail, just something to consider.
Matt Flaschen
On Wed, May 21, 2014 at 12:48 PM, Brion Vibber bvibber@wikimedia.orgwrote:
From my read, SplEnum is a bit janky -- you still have to defibe integer constants and may have to pass them in.
Also, SplEnum is not built-in. It's a PECL extension, so we'd have to require users to install it alongside MediaWiki.
*-- * *Tyler Romeo* Stevens Institute of Technology, Class of 2016 Major in Computer Science
On Tue, May 20, 2014 at 3:32 PM, Sumana Harihareswara <sumanah@wikimedia.org
wrote:
Hey, developers. This week - tomorrow, 2100 UTC on Wednesday - we'll be talking about Andrew Green's "Typesafe enums" proposal https://www.mediawiki.org/wiki/Requests_for_comment/Typesafe_enums
I don't use enums in other languages and I probably won't use them in PHP either. Solution in search of a problem, imho.
In fact, "Do nothing, there's nothing inherently wrong with class constants" is the first option under the list of options being considered. My vote is for that.
-Chad
On 05/20/2014 06:32 PM, Sumana Harihareswara wrote:
Hey, developers. This week - tomorrow, 2100 UTC on Wednesday - we'll be talking about Andrew Green's "Typesafe enums" proposal https://www.mediawiki.org/wiki/Requests_for_comment/Typesafe_enums , and looking to finish off the next step of C. Scott Ananian's "Square bounding boxes" RfC. https://www.mediawiki.org/wiki/Requests_for_comment/Square_bounding_boxes
We'll be in #wikimedia-office - for YOUR time, try this: http://everytimezone.com/#2014-5-21,540,6bj
Meeting page: https://www.mediawiki.org/wiki/Architecture_meetings/RFC_review_2014-05-21
This happens in about 30 minutes.
On 05/20/2014 06:32 PM, Sumana Harihareswara wrote:
Hey, developers. This week - tomorrow, 2100 UTC on Wednesday - we'll be talking about Andrew Green's "Typesafe enums" proposal https://www.mediawiki.org/wiki/Requests_for_comment/Typesafe_enums , and looking to finish off the next step of C. Scott Ananian's "Square bounding boxes" RfC. https://www.mediawiki.org/wiki/Requests_for_comment/Square_bounding_boxes
Summary & logs: https://www.mediawiki.org/wiki/Architecture_meetings/RFC_review_2014-05-21#S...
We agreed not to use SplEnum, as it's not available by default, and to have Andrew benchmark setup and access performance for his proposal. Regarding square bounding boxes and upright, C. Scott will check in with Raimond Spekking, the original author of upright, and will work to ensure rollout doesn't cause deployment or scaler problems.
Next week we will probably be talking about Pau Giner's grid system RfC https://www.mediawiki.org/wiki/Requests_for_comment/Grid_system and about extension management, probably on Monday the 26th and probably at a time better for Australia and Asia.
Still the plan.
wikitech-l@lists.wikimedia.org