www.digitalmars.com         C & C++   DMDScript  

D - 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?
Feb 27 2002