inlining or not inlining...

Walter Bright newshound2 at digitalmars.com
Sun Feb 13 19:42:09 PST 2011


bearophile wrote:
> Walter:
> 
>> The inline assembler can't do everything a standalone assembler can, but
>> what it does it does well enough, and is a pleasure (to me) to use.
> 
> The D inline assembler has another purpose you have not underlined: it's a
> didactic tool to learn some assembly without nothing but the normal D
> compiler. Delphi too allows inline asm, and I know some people that have used
> just that to learn and use assembly.

Yes, you're right.


> The evolution of species is not a constant flow of changes. After a period of
> quick change, species often froze in many of their characteristics, and then
> they adapt only in a small ways, or in "alternative" ways, while keeping most
> of their original design. In the meantime new species branch sideways, and
> most of the actual fundamental changes happen during this side branching.
> 
> To me something quite similar seems to happen to software technology: people
> that program in assembly seems furiously attached to ancient ways to use
> assembly, even if new and new languages and their ecosystems have invented
> better and better ways to program.
> 
> There is not much intrinsic in the asm language that forces people to not
> define and use a good type system on asm instructions to catch programming
> bugs, to indent asm code well, to use a modern IDE on asm code, and so on.
> But most asm programmers seem uninterested in those new tools and new
> possibilities. All this is quite fascinating.

In that vein, it is exceedingly miserable that assemblers do not accept struct 
declarations in C format. I always have to painstakingly translate them, and 
double check that all the offsets and alignment are correct. What a pain.



More information about the Digitalmars-d mailing list