<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 21 May 2013 13:50:11 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Dikini.net: Rewriting macros - the peculiar case of php]]></title>
      <guid>http://www.phpdeveloper.org/news/6062</guid>
      <link>http://www.phpdeveloper.org/news/6062</link>
      <description><![CDATA[<p>
On Dikiki.net today, there's <a href="http://dikini.net/16.08.2006/rewriting_macros_the_peculiar_case_of_php">a new post</a> that's a continuation of a series (<a href="http://www.phpdeveloper.org/news/5882">first post</a>, <a href="http://www.phpdeveloper.org/news/5923">second post</a>) dealing with macro programming in PHP.
</p>
<blockquote>
Without going into theoretical details, some of which are quite alien to me, I'll try to describe some of the challenges that pattern patching rewriting macros might pose for a language like php. After brief explanation what kind of a beast is this, I try to explore some of the finer points, which might cause problems. The intent of this post is to sketch a design and highlight some of the possible issues.
</blockquote>
<p>
He <a href="http://dikini.net/16.08.2006/rewriting_macros_the_peculiar_case_of_php">breaks up the post</a> into a few sections:
<ul>
<li>pattern matching rewrite only macros - a bird eye view
<li>Transformation time
<li>Basic/skeleton shapes and intermediate shapes
<li>Code generation issues specific to php
<li>Hygiene
<li>A rough macro shape outline
<li>Output/Status of the project
</ul>
There are code examples (of how it should work) and explainations of the issues PHP would face to accomplish this goal.
</p>]]></description>
      <pubDate>Thu, 17 Aug 2006 07:29:04 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Dikini.net: Poor man's macro programming in php (revisited)]]></title>
      <guid>http://www.phpdeveloper.org/news/5923</guid>
      <link>http://www.phpdeveloper.org/news/5923</link>
      <description><![CDATA[<p>
In refernece to <a href="http://www.phpdeveloper.org/news/5882">his previous post</a> on macro programming in PHP, <i>vlado</i> is back with <a href="http://dikini.net/01.08.2006/poor_mans_macro_programming_in_php_revisited">this new post</a> answering the question "How exactly can you do macros in php now?"
</p>
<blockquote>
Macros have (let's say) two main responsibilities - adding syntactic sugar and abstraction of common patterns. The syntactic sugar bit is something which probably should happen at compile time, at least in a weakly typed language like php. So I'll skip them. The abstraction of computation, well this is wat codified design patterns are.
</blockquote>
<p>
He <a href="http://dikini.net/01.08.2006/poor_mans_macro_programming_in_php_revisited">illustrates</a> what a macro might look like, using the generic functions and partial evaluation patterns to accomplish it. He also shows it being possible with something built around a create_function call. 
</p>
<blockquote>
So what do these example prove? Well, php has decent abstraction mechanisms. The fact that we can do indirect function calls and indirect variable (symbol) resolution can give us useful means to code in different design patterns. How can we make proper macros? Is it too complicated to have something like <a href="http://people.csail.mit.edu/jrb/Projects/dexprs.pdf">dylan macros (a nice paper from 1999)</a>
</blockquote>]]></description>
      <pubDate>Tue, 01 Aug 2006 06:16:38 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Dikini.net: Poor man's macro programming in php]]></title>
      <guid>http://www.phpdeveloper.org/news/5882</guid>
      <link>http://www.phpdeveloper.org/news/5882</link>
      <description><![CDATA[<p>
<i>vlado</i>, thinking more about a <a href="http://www.phpdeveloper.org/news/5872">previous post</a>, started wondering what exactly you'd need to do to get macros working in PHP. Read on for <a href="http://dikini.net/26.07.2006/poor_mans_macro_programming_in_php">his answers</a>.
</p>
<blockquote>
What is the closest we can get to that without actually changing anything in php (poor man's version? What minimal sugar does php need to make it comfy? What is the natural syntax for macros in php? I definitely don't know the answers to these questions but let's try.
</blockquote>
<p>
He <a href="http://dikini.net/26.07.2006/poor_mans_macro_programming_in_php">doesn't create working code</a>, but he does make it a PHP-ish looking solution. He also suggests that while PHP doesn't have this ability (yet?), the <a href="http://dikini.net/generic_function">generic function</a> pattern can help mimic its functionality pretty closely.
</p>]]></description>
      <pubDate>Wed, 26 Jul 2006 13:27:48 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jonnay's Blog: Googles Summer of yawn.]]></title>
      <guid>http://www.phpdeveloper.org/news/5872</guid>
      <link>http://www.phpdeveloper.org/news/5872</link>
      <description><![CDATA[<p>
On his blog today, <i>Jonnay</i> looks at the Google "Summer of Code" (or as he calls it, their "Summer of Yawn"), specifically at one project, the <a href="http://code.google.com/soc/php/appinfo.html?csaid=3752FBA8CFFCD528">PHP Macro Preprocessor</a>.
</p>
<blockquote>
This (as described) sounds exactly like a rewrite of the C preprocessor, which one can work with fairly easily in a PHP environment. To see this duplication of effort on something so boring and useless makes me question just how much PHP is its own language, versus a Frankensteins monster of language clones; see PHP 5's object system for a perfect example.
</blockquote>
<p>
He <a href="http://blog.jonnay.net/archives/739-Googles-Summer-of-yawn..html">comments</a> that maybe the developer should have come up with a different way to do it instead of making what appears to be a sibling of the current processor. He also suggests that PHP developers step up and create methods for the current compiler to make using things like design patterns much simpler than they currently are.
</p>]]></description>
      <pubDate>Wed, 26 Jul 2006 05:38:29 -0500</pubDate>
    </item>
  </channel>
</rss>
