Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: rearrange class/id/name
Actually, I don’t think there would be any significant performance impact. There would need to be tens of thousands of such calls per page before the difference would become noticeable, I would think.
Offline
Re: rearrange class/id/name
Why is this even being considered? It’s just plain ugly.
Offline
Re: rearrange class/id/name
ruud wrote:
Perhaps this calls for a more drastic change. Let’s drop PHP and switch to Python so we can use named parameters in function calls ;)
Offline
Re: rearrange class/id/name
Yeah, Python supports it natively. PHP does not. Let’s not pretend that it does.
PS. note the smiley on that original comment.
Last edited by ruud (2009-09-11 20:12:19)
Offline
Re: rearrange class/id/name
Yes, I know. Just pointing out that you were the one who opened the can of worms! ;) You also requested a benchmark, which I provided. So perhaps you have contributed to the perception that this is being actively considered. Personally, I think there are far more important things to spend our time on.
Offline
Re: rearrange class/id/name
If PHP had native support for named parameters in function calls, this may have been possible:
some_function('type', 'class', id='id')
That’s shorter and looks cleaner than this:
some_function(array('type' => 'type', 'class' => 'class', 'id' => 'id'))
Which is even longer than what we have now:
some_function('type', 'class', '', '', '', '', '', id)
Check the bottom of the can of worms. The “best before” date has expired. Let’s get rid of it or at least put the lid back on, because it’s getting smelly ;)
[and you’re right. I shouldn’t have asked for a benchmark and there are more important things]
Offline
Offline
#32 2009-09-11 22:31:39
- TheEric
- Plugin Author
- From: Wyoming
- Registered: 2004-09-17
- Posts: 566
Re: rearrange class/id/name
…so, moving id next to class? Yay/Nay?
Offline