PHP-style (embedded variables) print statements

Unknown W. Brackets unknown at simplemachines.org
Tue Jun 5 00:40:54 PDT 2007


That becomes impractical when you have real-time code completion to deal 
with (example: struct.member... "$struct.member" should then work too 
but it's unlikely to be practical to figure that per keystroke.)

-[Unknown]


Don Clugston wrote:
> Unknown W. Brackets wrote:
>> I hate it when people use this in PHP and Perl, it can be un-greppable 
> 
> This is a really important problem. I think it is relevant to almost any 
> domain-specific language. (Find all references to variable xxx).
> Inside an IDE, you could theoretically grep on the source the compiler 
> sees after mixins are evaluated, but it's pretty nasty otherwise.
> 
>> and there's so much ambiguity when using arrays and similar.
>>
>> Still, pretty cool to be able to do it in D.  Just shows D's strengths.
>>
>> -[Unknown]
>>
>> Don Clugston Wrote:
>>
>>> With CTFE and text mixins, it is now reasonably straightforward to 
>>> implement PHP-style 'dollar' embedded variables, in a type-safe manner.



More information about the Digitalmars-d mailing list