My first draft of hierarchy traversing component got some serious feedback, and it’s time to make some changes before moving on to the next challenges. Hierarchy traverser is not optimal yet as it uses tail-call recursion and it’s easy to run to Stack Overflow with it. This blog post solves this problem and prepares for the next challenges like node cache and continue-from-given-node.

Problem: Running to Stack Overflow

As reader Ants pointed out then, .NET runtime doesn’t always optimize tail-call recursion and using this simple piece of code, it’s possible to run to Stack Overflow fast.

Source de l’article sur DZONE

L’assistance proposée par ANKAA PMO

ANKAA PMO présent depuis plus de 20 ans sur le marché des services IT, accompagne les DSI dans leur recherche de compétences pour des besoins de renforts en mode régie ou l’externalisation de projets.
Vous souhaitez plus d’information ? Cliquez ici


0 réponses

Laisser un commentaire

Participez-vous à la discussion?
N'hésitez pas à contribuer!

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *