Super-dee-duper D features

cracki christoph.rackwitz at gmail.removethispart.com
Tue Feb 13 21:15:57 PST 2007


Sean Kelly wrote:
>Walter Bright wrote:
>>I see:
>>    1- x
>>in the Lisp code, and have to mentally translate it to:
>>    x - 1
>>and not:
>>    1 - x
>>
>>This just hurts my brain.
>
>I thought Lisp used prefix notation, but the above syntax looks like
>element composition.
>
>
>Sean


nah. reading s-expressions needs some getting used to. you're reading
serialized tree structure there after all.

the "1-" is the name of a function. instead of writing

	(1- x)

you could of couse define a function "subtract-one" that does the same
and then write

	(subtract-one x)

but that's not much more readable. you can of course write

	(- x 1)

and any lisp compiler optimizes it.



More information about the Digitalmars-d mailing list