Re: weird macro params issue

Attila Szegedi <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
On 2008.05.22., at 15:10, Tim Diggins wrote:

> I hope you're not arguing that character count is more important than
> understandability / readability / learnability.

I'm not. As a matter of fact, to this day I prefer the old existence  
built-ins "?default" and "?exists" for similar reasons I prefer Java  
"extends" to C# ":" :-)
I don't feel that <#macro m a b=a> impacts understandability or  
readability. To me,

<#macro a b!>
   <#if !b??>
     <#local b=a/>
   </#if>
</#macro>

would, honestly, be less understandable IMHO. The b=a doesn't  
introduce any new syntax - it's your good ol' defaulted argument, the  
only novelty is it's defaulting to value of another argument, which is  
also visually located near it, so I don't believe it makes  
understanding the meaning too daunting.

Attila.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.