2008-04-27

For instance (more about functions as arguments)

So, passing functions as arguments by turning them into strings, that's fine I suppose for traditional functions. But what about object methods? How am I supposed to transform $obj->do_something() into a string that I can feed to another function? That is what I would like to know.

php5 makes php bearable

Just to show what an amazingly open mind I have, I just wanted to add that after moving to php5 and trying to be as object-oriented as I can, I have started to find that programming in php can be less painful than I originally thought.

I am starting to get used to some of the overall quirkiness of the language. I even forgive it for having so ding many functions, since Common Lisp has quite a few as well.

Overall, I find that there is a lack of coherence in the way the function are implemented. I still have to look everything up all the time, but that is probably just me. However I expect a function to work, php usually does the opposite. But hey, they wrote the language, so they can do what they want. More substantially, I find completely counterintuitive and backwards the way that you pass functions as string arguments. At least in Perl, even though all arguments are passed as values, you are passing a reference, not just a string name. It just feels wrong, I'm telling you! I'd be willing to make function objects and pass them instead, but you still would have to feed those objects with strings naming functions... so back to square zero.

2008-04-13

From 4 to 5

Well, I get to play with php5 instead of php4. This is huge news for me, as I intend to use stored procedures in MySQL, which is all but impossible with php4.

I'm taking advantage of this change to really make this new project object-oriented. I'm not much of an OOP fanatic myself, but I do see some advantages here, especially since it is so ding hard to write anonymous functions and to pass them around. (At least that is my impression.) php5 seems set up in a way that encourages you to pass objects around instead, so I will adjust.