Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2009-09-11 18:14:02

artagesw
Member
From: Seattle, WA
Registered: 2007-04-29
Posts: 227
Website

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

#26 2009-09-11 18:40:38

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: rearrange class/id/name

Why is this even being considered? It’s just plain ugly.

Offline

#27 2009-09-11 18:59:07

artagesw
Member
From: Seattle, WA
Registered: 2007-04-29
Posts: 227
Website

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

#28 2009-09-11 19:12:21

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

#29 2009-09-11 20:09:51

artagesw
Member
From: Seattle, WA
Registered: 2007-04-29
Posts: 227
Website

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

#30 2009-09-11 20:18:10

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

#31 2009-09-11 20:36:53

artagesw
Member
From: Seattle, WA
Registered: 2007-04-29
Posts: 227
Website

Re: rearrange class/id/name

Agree on all points!

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

Board footer

Powered by FluxBB