<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Fluent Arrays and Strings in PHP</title>
	<link>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/</link>
	<description>Dev related notes, tutorials and anecdotes</description>
	<pubDate>Sat, 22 Nov 2008 06:20:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Henrik</title>
		<link>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/#comment-1518</link>
		<dc:creator>Henrik</dc:creator>
		<pubDate>Fri, 27 Jun 2008 06:14:36 +0000</pubDate>
		<guid>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/#comment-1518</guid>
		<description>Learning the stuff should be easy easier than using straight PHP anyway, since when you create something like this you&#39;re bound to wrap some pretty horrible core names with more intuitive ones.&#60;br&#62;&#60;br&#62;Also when using apply() et al with this little library all the arguments will be evaluated in the same order as the core functions. Plus often there are good defaults being passed, with a fluent library I believe you will spend a lot less time checking the PHP function reference which translates into productivity.&#60;br&#62;&#60;br&#62;A agree totally with you on the speed though, there are a lot of assignments etc going on back and forth. One simply has to decide when to not use it for fear of bad performance. At the moment I&#39;m creating a back end admin system where the load will not be very big, therefore performance will not be an issue this time.</description>
		<content:encoded><![CDATA[<p>Learning the stuff should be easy easier than using straight PHP anyway, since when you create something like this you&#39;re bound to wrap some pretty horrible core names with more intuitive ones.&lt;br&gt;&lt;br&gt;Also when using apply() et al with this little library all the arguments will be evaluated in the same order as the core functions. Plus often there are good defaults being passed, with a fluent library I believe you will spend a lot less time checking the PHP function reference which translates into productivity.&lt;br&gt;&lt;br&gt;A agree totally with you on the speed though, there are a lot of assignments etc going on back and forth. One simply has to decide when to not use it for fear of bad performance. At the moment I&#39;m creating a back end admin system where the load will not be very big, therefore performance will not be an issue this time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Henrik</title>
		<link>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/#comment-948</link>
		<dc:creator>Henrik</dc:creator>
		<pubDate>Fri, 27 Jun 2008 05:14:36 +0000</pubDate>
		<guid>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/#comment-948</guid>
		<description>Learning the stuff should be easy easier than using straight PHP anyway, since when you create something like this you're bound to wrap some pretty horrible core names with more intuitive ones.

Also when using apply() et al with this little library all the arguments will be evaluated in the same order as the core functions. Plus often there are good defaults being passed, with a fluent library I believe you will spend a lot less time checking the PHP function reference which translates into productivity.

A agree totally with you on the speed though, there are a lot of assignments etc going on back and forth. One simply has to decide when to not use it for fear of bad performance. At the moment I'm creating a back end admin system where the load will not be very big, therefore performance will not be an issue this time.</description>
		<content:encoded><![CDATA[<p>Learning the stuff should be easy easier than using straight PHP anyway, since when you create something like this you&#8217;re bound to wrap some pretty horrible core names with more intuitive ones.</p>
<p>Also when using apply() et al with this little library all the arguments will be evaluated in the same order as the core functions. Plus often there are good defaults being passed, with a fluent library I believe you will spend a lot less time checking the PHP function reference which translates into productivity.</p>
<p>A agree totally with you on the speed though, there are a lot of assignments etc going on back and forth. One simply has to decide when to not use it for fear of bad performance. At the moment I&#8217;m creating a back end admin system where the load will not be very big, therefore performance will not be an issue this time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel Birke</title>
		<link>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/#comment-1517</link>
		<dc:creator>Gabriel Birke</dc:creator>
		<pubDate>Thu, 26 Jun 2008 15:37:42 +0000</pubDate>
		<guid>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/#comment-1517</guid>
		<description>If you want an unbiased, helpful article on the pros and cons of eval (cons are security and speed), see this: &#60;a href=&#34;http://blog.joshuaeichorn.com/archives/2005/08/01/using-eval-in-php/&#34;&#62;http://blog.joshuaeichorn.com/archives/2005/08/...&#60;/a&#62;&#60;br&#62;&#60;br&#62;In case of your fluent library I think it&#39;s a tradeoff between programming speed and code speed: Once you have learnt and memorized the fluent interface (don&#39;t know how long that will take), you will achieve more with less code that looks more elegant. But I fear that &#34;ugly&#34; raw PHP code will be significantly faster than your library. Maybe you can test my assumption with some benchmarks.</description>
		<content:encoded><![CDATA[<p>If you want an unbiased, helpful article on the pros and cons of eval (cons are security and speed), see this: &lt;a href=&quot;http://blog.joshuaeichorn.com/archives/2005/08/01/using-eval-in-php/&quot;&gt;http://blog.joshuaeichorn.com/archives/2005/08/&#8230;&lt;/a&gt;&lt;br&gt;&lt;br&gt;In case of your fluent library I think it&#39;s a tradeoff between programming speed and code speed: Once you have learnt and memorized the fluent interface (don&#39;t know how long that will take), you will achieve more with less code that looks more elegant. But I fear that &quot;ugly&quot; raw PHP code will be significantly faster than your library. Maybe you can test my assumption with some benchmarks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel Birke</title>
		<link>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/#comment-945</link>
		<dc:creator>Gabriel Birke</dc:creator>
		<pubDate>Thu, 26 Jun 2008 14:37:42 +0000</pubDate>
		<guid>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/#comment-945</guid>
		<description>If you want an unbiased, helpful article on the pros and cons of eval (cons are security and speed), see this: http://blog.joshuaeichorn.com/archives/2005/08/01/using-eval-in-php/

In case of your fluent library I think it's a tradeoff between programming speed and code speed: Once you have learnt and memorized the fluent interface (don't know how long that will take), you will achieve more with less code that looks more elegant. But I fear that "ugly" raw PHP code will be significantly faster than your library. Maybe you can test my assumption with some benchmarks.</description>
		<content:encoded><![CDATA[<p>If you want an unbiased, helpful article on the pros and cons of eval (cons are security and speed), see this: <a href="http://blog.joshuaeichorn.com/archives/2005/08/01/using-eval-in-php/" rel="nofollow">http://blog.joshuaeichorn.com/archives/2005/08/01/using-eval-in-php/</a></p>
<p>In case of your fluent library I think it&#8217;s a tradeoff between programming speed and code speed: Once you have learnt and memorized the fluent interface (don&#8217;t know how long that will take), you will achieve more with less code that looks more elegant. But I fear that &#8220;ugly&#8221; raw PHP code will be significantly faster than your library. Maybe you can test my assumption with some benchmarks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Henrik</title>
		<link>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/#comment-1516</link>
		<dc:creator>Henrik</dc:creator>
		<pubDate>Thu, 26 Jun 2008 03:39:42 +0000</pubDate>
		<guid>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/#comment-1516</guid>
		<description>It&#39;s funny, I never really understood the whole evil vs not evil debate regarding various aspects of various environments/languages, arguably PHP has more of these things than any language. Regardless of which ever of these aspects you use the evilness of it will depend on how you use it, usually sloppily or properly. Although I am hard pressed to think of a situation where register globals is a cool thing...</description>
		<content:encoded><![CDATA[<p>It&#39;s funny, I never really understood the whole evil vs not evil debate regarding various aspects of various environments/languages, arguably PHP has more of these things than any language. Regardless of which ever of these aspects you use the evilness of it will depend on how you use it, usually sloppily or properly. Although I am hard pressed to think of a situation where register globals is a cool thing&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Henrik</title>
		<link>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/#comment-944</link>
		<dc:creator>Henrik</dc:creator>
		<pubDate>Thu, 26 Jun 2008 02:39:42 +0000</pubDate>
		<guid>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/#comment-944</guid>
		<description>It's funny, I never really understood the whole evil vs not evil debate regarding various aspects of various environments/languages, arguably PHP has more of these things than any language. Regardless of which ever of these aspects you use the evilness of it will depend on how you use it, usually sloppily or properly. Although I am hard pressed to think of a situation where register globals is a cool thing...</description>
		<content:encoded><![CDATA[<p>It&#8217;s funny, I never really understood the whole evil vs not evil debate regarding various aspects of various environments/languages, arguably PHP has more of these things than any language. Regardless of which ever of these aspects you use the evilness of it will depend on how you use it, usually sloppily or properly. Although I am hard pressed to think of a situation where register globals is a cool thing&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jani Hartikainen</title>
		<link>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/#comment-1515</link>
		<dc:creator>Jani Hartikainen</dc:creator>
		<pubDate>Wed, 25 Jun 2008 15:47:35 +0000</pubDate>
		<guid>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/#comment-1515</guid>
		<description>I can&#39;t say about Ruby since I haven&#39;t used it, but jQuery does a lot more than wraps JavaScript functionality in chains. Its usefulness in my opinion springs from the power the methods grant you - you could do the same stuff with a non-chained style as well, but they decided to use chains.&#60;br&#62;&#60;br&#62;&#60;br&#62;I can agree with the useless assignations part. I guess it&#39;s just something you gotta deal with when working in a language that isn&#39;t completely object-based. I don&#39;t find myself doing that many of those though, as usually I would perform more actions for each assigned variable, conditionally etc. so chains wouldn&#39;t work... except pQ style when(...)-&#38;gt;not-&#38;gt;greaterThan(...)-&#38;gt;do(...) chains, which I&#39;ve actually implemented but they are undocumented in my blogposts.&#60;br&#62;&#60;br&#62;Oh, and eval is evil!... Although people have said pooQuery is evil as well ;)</description>
		<content:encoded><![CDATA[<p>I can&#39;t say about Ruby since I haven&#39;t used it, but jQuery does a lot more than wraps JavaScript functionality in chains. Its usefulness in my opinion springs from the power the methods grant you - you could do the same stuff with a non-chained style as well, but they decided to use chains.&lt;br&gt;&lt;br&gt;&lt;br&gt;I can agree with the useless assignations part. I guess it&#39;s just something you gotta deal with when working in a language that isn&#39;t completely object-based. I don&#39;t find myself doing that many of those though, as usually I would perform more actions for each assigned variable, conditionally etc. so chains wouldn&#39;t work&#8230; except pQ style when(&#8230;)-&amp;gt;not-&amp;gt;greaterThan(&#8230;)-&amp;gt;do(&#8230;) chains, which I&#39;ve actually implemented but they are undocumented in my blogposts.&lt;br&gt;&lt;br&gt;Oh, and eval is evil!&#8230; Although people have said pooQuery is evil as well <img src='http://www.prodevtips.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jani Hartikainen</title>
		<link>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/#comment-939</link>
		<dc:creator>Jani Hartikainen</dc:creator>
		<pubDate>Wed, 25 Jun 2008 14:47:35 +0000</pubDate>
		<guid>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/#comment-939</guid>
		<description>I can't say about Ruby since I haven't used it, but jQuery does a lot more than wraps JavaScript functionality in chains. Its usefulness in my opinion springs from the power the methods grant you - you could do the same stuff with a non-chained style as well, but they decided to use chains.


I can agree with the useless assignations part. I guess it's just something you gotta deal with when working in a language that isn't completely object-based. I don't find myself doing that many of those though, as usually I would perform more actions for each assigned variable, conditionally etc. so chains wouldn't work... except pQ style when(...)-&#62;not-&#62;greaterThan(...)-&#62;do(...) chains, which I've actually implemented but they are undocumented in my blogposts.

Oh, and eval is evil!... Although people have said pooQuery is evil as well ;)</description>
		<content:encoded><![CDATA[<p>I can&#8217;t say about Ruby since I haven&#8217;t used it, but jQuery does a lot more than wraps JavaScript functionality in chains. Its usefulness in my opinion springs from the power the methods grant you - you could do the same stuff with a non-chained style as well, but they decided to use chains.</p>
<p>I can agree with the useless assignations part. I guess it&#8217;s just something you gotta deal with when working in a language that isn&#8217;t completely object-based. I don&#8217;t find myself doing that many of those though, as usually I would perform more actions for each assigned variable, conditionally etc. so chains wouldn&#8217;t work&#8230; except pQ style when(&#8230;)-&gt;not-&gt;greaterThan(&#8230;)-&gt;do(&#8230;) chains, which I&#8217;ve actually implemented but they are undocumented in my blogposts.</p>
<p>Oh, and eval is evil!&#8230; Although people have said pooQuery is evil as well <img src='http://www.prodevtips.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Henrik</title>
		<link>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/#comment-1514</link>
		<dc:creator>Henrik</dc:creator>
		<pubDate>Wed, 25 Jun 2008 11:53:39 +0000</pubDate>
		<guid>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/#comment-1514</guid>
		<description>You little... :)  I read the comments over there but though there was a lot of speculation it never got clear whether it was a joke or not.&#60;br&#62;&#60;br&#62;1.) The &#34;meta language&#34; you are referring to is just executable PHP with placeholders, unfortunately a necessary evil, however it shouldn&#39;t be too hard to manage, the hardest part is simply keeping track of how some arguments work in some places. Making a manual for something like this wouldn&#39;t be too much work for the most part.&#60;br&#62;&#60;br&#62;2.) The whole point is that it simply isn&#39;t just another way of doing the same thing, it&#39;s a better, smaller, clearer way of doing the same thing (as opposed to your joke). Do you really think jQuery and Ruby would be as popular as they are if it wasn&#39;t super easy to string executions together in this way?&#60;br&#62;&#60;br&#62;Personally I hate having to do pointless assignments just to keep my code readable. To my knowledge only Lisp manages to pull off the whole func(func(arg)) thing in a graceful way, certainly not PHP...</description>
		<content:encoded><![CDATA[<p>You little&#8230; <img src='http://www.prodevtips.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I read the comments over there but though there was a lot of speculation it never got clear whether it was a joke or not.&lt;br&gt;&lt;br&gt;1.) The &quot;meta language&quot; you are referring to is just executable PHP with placeholders, unfortunately a necessary evil, however it shouldn&#39;t be too hard to manage, the hardest part is simply keeping track of how some arguments work in some places. Making a manual for something like this wouldn&#39;t be too much work for the most part.&lt;br&gt;&lt;br&gt;2.) The whole point is that it simply isn&#39;t just another way of doing the same thing, it&#39;s a better, smaller, clearer way of doing the same thing (as opposed to your joke). Do you really think jQuery and Ruby would be as popular as they are if it wasn&#39;t super easy to string executions together in this way?&lt;br&gt;&lt;br&gt;Personally I hate having to do pointless assignments just to keep my code readable. To my knowledge only Lisp manages to pull off the whole func(func(arg)) thing in a graceful way, certainly not PHP&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Henrik</title>
		<link>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/#comment-938</link>
		<dc:creator>Henrik</dc:creator>
		<pubDate>Wed, 25 Jun 2008 10:53:39 +0000</pubDate>
		<guid>http://www.prodevtips.com/2008/06/23/fluent-arrays-and-strings-in-php/#comment-938</guid>
		<description>You little... :)  I read the comments over there but though there was a lot of speculation it never got clear whether it was a joke or not.

1.) The "meta language" you are referring to is just executable PHP with placeholders, unfortunately a necessary evil, however it shouldn't be too hard to manage, the hardest part is simply keeping track of how some arguments work in some places. Making a manual for something like this wouldn't be too much work for the most part.

2.) The whole point is that it simply isn't just another way of doing the same thing, it's a better, smaller, clearer way of doing the same thing (as opposed to your joke). Do you really think jQuery and Ruby would be as popular as they are if it wasn't super easy to string executions together in this way?

Personally I hate having to do pointless assignments just to keep my code readable. To my knowledge only Lisp manages to pull off the whole func(func(arg)) thing in a graceful way, certainly not PHP...</description>
		<content:encoded><![CDATA[<p>You little&#8230; <img src='http://www.prodevtips.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I read the comments over there but though there was a lot of speculation it never got clear whether it was a joke or not.</p>
<p>1.) The &#8220;meta language&#8221; you are referring to is just executable PHP with placeholders, unfortunately a necessary evil, however it shouldn&#8217;t be too hard to manage, the hardest part is simply keeping track of how some arguments work in some places. Making a manual for something like this wouldn&#8217;t be too much work for the most part.</p>
<p>2.) The whole point is that it simply isn&#8217;t just another way of doing the same thing, it&#8217;s a better, smaller, clearer way of doing the same thing (as opposed to your joke). Do you really think jQuery and Ruby would be as popular as they are if it wasn&#8217;t super easy to string executions together in this way?</p>
<p>Personally I hate having to do pointless assignments just to keep my code readable. To my knowledge only Lisp manages to pull off the whole func(func(arg)) thing in a graceful way, certainly not PHP&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
