Worse is better?

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Tue Oct 14 01:00:19 PDT 2014


On Tuesday, 14 October 2014 at 07:25:59 UTC, Ola Fosheim Grøstad 
wrote:
> But maybe you don't really do low level programming then? In 
> which areas of low level programming are templates critical? I 
> have trouble finding examples where I have used it or seen it 
> used for anything non-trivial in performant code.

I don't do it right now but I definitely did (assuming barebone 
MIPS sounds low-level enough). And I can't say anything good 
about this experience from pure programming technology point of 
view.

Templates are not about low level or high level of domain. It is 
a tool to reduce code redundancy and simplify maintenance of 
large code base. I am not even speaking about algorithms in STL 
or std.algorithm sense but much more routine things - common 
small snippets that either get copy-pasted or hidden behind C 
macros.

Probably when you say "low level" you imagine something like 
embedded microcontrollers. But there quite many huge scale 
systems out there too, sometimes reaching millions lines of C 
code. And those struggle from minimal C abstraction capabilities.


More information about the Digitalmars-d mailing list