Timeline for Making PHP composable and look functional
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 12, 2015 at 14:43 | answer | added | lilobase | timeline score: 2 | |
Dec 12, 2014 at 12:42 | history | tweeted | twitter.com/#!/StackCodeReview/status/543385345233260544 | ||
Dec 11, 2014 at 9:42 | comment | added | Elias Van Ootegem | @feeela: That's rubbish. I'm sorry, but closures/lambda's are common in (and indeed a key feature of) functional languages, they don't always result in pure functions, though | |
Dec 9, 2014 at 8:52 | history | edited | Letharion | CC BY-SA 3.0 |
added 119 characters in body
|
Dec 8, 2014 at 16:41 | comment | added | Letharion | @feeela I assume you are thinking of pure functions. I titled the question "look functional", because I'm aware that it won't be pure. | |
Dec 8, 2014 at 16:41 | history | edited | 200_success |
edited tags
|
|
Dec 8, 2014 at 15:51 | comment | added | feeela |
As from what I have learned, in functional programming each function only depends on its own arguments and on nothing more. Can a function utilizing $this-> be a part of functional programming?
|
|
Dec 8, 2014 at 15:50 | comment | added | Elias Van Ootegem | Well, if it performance is an issue and if you need to convince anyone to upgrade: moving to PHP 5.5 easily gives you a 20~30% performance boost, possibly more (after upgrading, we saw an increase of well over 25%) | |
Dec 8, 2014 at 15:44 | comment | added | Letharion | Hmm, that's a good point... It wasn't available until PHP 5.4 though, right? Sadly I still need it to work in PHP 5.3 as well, despite it's EOL status. I do utilize 5.4 features in the tests (which aren't posted), but I'm avoiding that in the main code for now. | |
Dec 8, 2014 at 15:43 | comment | added | Elias Van Ootegem |
whenever a function expects a function as an argument, it'd be best to add the callable type-hint. All in all, I'd also say that you're taking a tool (PHP), and try to use it as something it's not (ie a functional language). You can sort of pull this off, but it's not the best thing to do, IMHO. Using JS, or Scheme, or Haskell would be my advice
|
|
Dec 8, 2014 at 15:40 | history | edited | Letharion | CC BY-SA 3.0 |
added 209 characters in body
|
Dec 8, 2014 at 14:59 | history | asked | Letharion | CC BY-SA 3.0 |