Reflective Visitor vs. Meta Visitor

In a previous post, Johan explained us how he managed to get the visitor design pattern to work without having to redefine visitable methods in the visitor base class. This is quite interesting for some reasons :

  • This is the edge of C++ programming, few know how to use templates like this,
  • The choice of the method to execute is done at compile time, avoiding the runtime type checking implied with the Reflective version and this is good for speed of code execution.

However, there are a few issues. The Meta Visitor does not handle passing parameters like the Reflective one does. Even if it did, I expect the templated code to dramatically increase to a point where a normal human beeing is having a hard time reading it, along with giving a really hard time for the compiler to get to the end of it...

Anyway, I'm pretty confident about Johan ending up with a longer blog with a solution to this issue. (No stress Proppy, really :))

I'm a pragmatic developer, I try to consider all the aspects of the development and I tend to prefer readability over technically challenging code. But there's a place for everyone and researchers are here to make things go further away... Go, Go, Go proppy ;)

Publié vendredi 17 juin 2005 21:13 par jay
Ce post vous a plu ? Ajoutez le dans vos favoris pour ne pas perdre de temps à le retrouver le jour où vous en aurez besoin :

Commentaires


Les 10 derniers blogs postés

- EF et WPF par Matthieu MEZIL le il y a 3 heures et 21 minutes

- C# : Vérifications / Performances par Pierrick's Blog le il y a 6 heures et 56 minutes

- Du nouveau sur le clubvsts par Noham Choulant le il y a 8 heures et 36 minutes

- StyleCop SDK disponible par Michel Perfetti [Miiitch] le il y a 10 heures et 56 minutes

- Data Structures and Algorithms : un livre gratuit par Elise's blog le il y a 13 heures et 17 minutes

- [ASP.NET] - Ajax vNext Preview 2 par Aurelien's Blog - When ClientSide meets .Net le il y a 14 heures et 21 minutes

- TPH IS Not Null sur la relation par Matthieu MEZIL le il y a 16 heures et 41 minutes

- Mise à jours du code Source du .NET Framework 3.5 SP1 disponible sur le Reference Source Code Center par RedoBlog - The .NET Gentleman !!! le il y a 23 heures et 6 minutes

- ASP.net 3.5 SP1 : combiner les fichiers JavaScript grace au CompositeScript du ScriptManager (ex ScriptCombining du toolkitScriptManager) par Atteint de JavaScriptite Aiguë [Cyril Durand] le 08-28-2008, 22:39

- [Expression Web] Problème : Quand j'affiche l'Aide (F1), cela me met un message d'erreur. par Expression Web & Me le 08-28-2008, 19:44