Why I'm hesitating to switch to D
KennyTM~
kennytm at gmail.com
Sat Jul 2 23:27:21 PDT 2011
On Jul 3, 11 13:34, Andrei Alexandrescu wrote:
> On 7/2/11 11:39 PM, Walter Bright wrote:
>> On 6/30/2011 7:31 AM, Adam Ruppe wrote:
>>> Macros:
>>> TABLE=<table>$0</table>
>>>
>>> TH=<th>$1</th>$(TH $+)
>>> HEADERS=<tr>$(TH $1, $+)</tr>
>>>
>>> TD=<td>$1</td>$(TD $+)
>>> ROW=<tr>$(TD $1, $+)</tr>
>>
>>
>> Your idea also works for lists:
>>
>> $(UL
>> $(LI item 1)
>> $(LI item 2)
>> )
>>
>> now becomes:
>>
>> $(LIST
>> item 1,
>> item 2
>> )
>>
>> where:
>>
>> LI=<li>$1</li>$(LI $+)
>> LIST=$(UL $(LI $1, $+))
>
> Excellent idea. To complement it, we need a "text with commas" kind of
> thing so we don't need to insert $(COMMA) in longer list items:
>
> TXT = $0
>
> $(LIST
> $(TXT stuff, with, commas),
> stuff without commas,
> $(TXT got, the, idea)
> )
>
> Works?
>
> Andrei
There should be a DIP or Bugzilla to summarize all these improvements :)
More information about the Digitalmars-d
mailing list