Don wrote:
Andrei Alexandrescu wrote:
I think there's merit in binding via strings. It makes for very
flexible code that is future-proof, dynamic-linking-friendly, and
hot-swappable without recompiling (e.g. you don't need to recompile
because you now implement an interface etc.)
Does that still apply to the template version you proposed?
Of course. The template version includes the version that only does
dynamic lookup: you can do static, and you can do dynamic. The static
part allows you e.g. to optimize some cases if you so wish. With the
runtime string you can only do dynamic.
Again, making it a template in this case is a win-win thing. There's
nothing inferior about it.
Andrei