February 27, 2002 syntactic sugar for asm functions | ||||
---|---|---|---|---|
| ||||
I remember I've raised this topic long ago, but it wasn't much discussed and I've thought it's time to raise it again since D now has inline asm. What about allowing function body to be a single asm statement? extern(C) uint crc32(void* data, int len) asm { // assembler goes here } This is a very nice feature Borland Pascal implementations have, it makes the code somewhat neater compared to: extern(C) uint crc32(void* data, int len) { asm { // assembler goes here } } Not a big change anyhow... what do you think of it? |
Copyright © 1999-2021 by the D Language Foundation