Why I'm Excited about D

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 7 11:06:13 PDT 2015


On Tue, 07 Apr 2015 14:20:57 +0000, Jens Bauer wrote:

> If just incrementing a value, one could do as follows:
> PortB = (PortB | 0x00f0) + 1;
> ... oposite for decrementing:
> PortB = (PortB & 0xff0f) - 1;
> 
> But the @property can make all this transparent, so our sources become
> very easy to overview and understand.

and gcc can optimise function calls away (especially with 
`@attribute("forceinline")`), so it effectively compiles to the same code.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150407/85c4f933/attachment.sig>


More information about the Digitalmars-d mailing list