SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 33 of 33
  1. #26
    SitePoint Enthusiast
    Join Date
    Mar 2005
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the responses. i've used array_map before and that makes sense but I'll have to sift through some of the other ones. things due; brain tired.

    -j

  2. #27
    Web developer Carl's Avatar
    Join Date
    Sep 2003
    Location
    sweden
    Posts
    320
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kyberfabrikken
    Arg ... Not to smite drupal or anything, but wouldn't that become very unmanagable in no time ? You'll have to refer to a manual to figure out exactly what a function like theme() does ... no hints from the argumentlist, and rich use of globals.
    Well, uh, yeah....so what's your point?

    No, but seriously you are correct. When you develop for Drupal it takes about a year to get the code and even then you have to spend a lot of time in the API docs or just grepping the source code inorder to develop new modules or modify stuff. But this is the "Drupal Way" as they so eloquently put it. The use of PHP calbacks is their mainstay and defense against using OOP.

  3. #28
    SitePoint Guru 33degrees's Avatar
    Join Date
    May 2005
    Posts
    707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Selkirk
    Wact does something like this:
    Wordpress's plugin system works in a similar fashion, albeit in a somewhat less OOP way. Each plugin in the plugin directory gets included, and each has code to register its callback functions into the notification system.

    Quote Originally Posted by Selkirk
    It would be nice to see the callback in PHP go from a pseudo type to a real class.
    You know, whenever I start thinking about All The Stuff I Wish PHP Had, I end up transforming it into Ruby.

  4. #29
    Web developer Carl's Avatar
    Join Date
    Sep 2003
    Location
    sweden
    Posts
    320
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by 33degrees
    Wordpress's plugin system works in a similar fashion, albeit in a somewhat less OOP way. Each plugin in the plugin directory gets included, and each has code to register its callback functions into the notification system.



    You know, whenever I start thinking about All The Stuff I Wish PHP Had, I end up transforming it into Ruby.
    Yes, this is something I wish Drupal had rather than having every module load all of it functions everytime. Wordpress is nice like that.

  5. #30
    SitePoint Guru
    Join Date
    May 2005
    Location
    Finland
    Posts
    608
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by 33degrees
    You know, whenever I start thinking about All The Stuff I Wish PHP Had, I end up transforming it into Ruby.
    I suffer from the exact same symptom. So what we're going to need is mod_ruby on 90% of webhosts, and we can live in peace once again.

  6. #31
    SitePoint Zealot
    Join Date
    Jul 2004
    Location
    The Netherlands
    Posts
    170
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by stereofrog
    Currying in php
    Came across this today. Sometimes I wish you could do more at runtime. Perhaps a function data type in PHP 6?
    Last edited by michel; Jan 22, 2006 at 14:09.

  7. #32
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I hope you don't take it seriously. php is perhaps the least suitable language for functional programming.

  8. #33
    SitePoint Zealot
    Join Date
    Jul 2004
    Location
    The Netherlands
    Posts
    170
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by stereofrog
    I hope you don't take it seriously. php is perhaps the least suitable language for functional programming.
    I didn't take it seriously at all, i just happened to find some more PHP experiments. Amusing, that's all. I'm not sure if I was kidding about the function data type though. I don't have a clue if it's feasible for PHP to have this implemented. You would probably need namespaces then as well...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •