Fwd: [Vm-dev] VM Maker: VMMaker-dtl.194.mcz

Andreas Raab andreas.raab at gmx.de
Thu Oct 21 00:06:49 UTC 2010


On 10/20/2010 5:01 PM, Eliot Miranda wrote:
> A change set ifs fine.  But I still don't quite understand why you need
> the inSmalltalk: argument.  I'm assuming
>
> self ifDefined: aConstantName
>        inSmalltalk: [smalltalk statements]
>        comment: aComment
>        ifTrue: [true statements]
>        ifFalse: [false statements]
>
> then surely that's equivalent to
>
> self ifDefined: aConstantName
>        comment: aComment
>        ifTrue: [self cCode: [true statements] inSmalltalk: [smalltalk
> statements]]
>        ifFalse: [self cCode: [false statements] inSmalltalk: [smalltalk
> statements]]
>
> which is much nicer IMO because it is orthogonal.

My understanding is that the 'inSmalltalk' is the block producing the 
value of the ifdef, e.g.,

	self isDefined: 'WIN32' inSmalltalk:[Smalltalk platformName = 'Win32']
		...

Thus it would not be equivalent at all.

Cheers,
   - Andreas


More information about the Vm-dev mailing list