2012-02-01 14 views
13

Parece que los desarrolladores anteriores del proyecto actual con el que estoy trabajando se enteraron de que el final de su tiempo se acercaba y decidieron para crear un código que funcione pero que sea inmanejable para ser una molestia para cualquiera que se ocupe de ello a continuación. Lamentablemente, soy dicha persona.Estoy buscando una herramienta gratuita independiente o complementario, que pueda descomponer expresiones ternarias

En todo el código estoy encontrando expresiones ternarias multi-conditional. Se está convirtiendo en un dolor de cabeza para traducir y re-escribir/refactorizarlos.

¿Alguien sabe de una herramienta gratuita, independiente o como un complemento para VS 2008, que puede descomponer expresiones ternarias? No hay presupuesto para CodeRush en este proyecto. Continuaré re-codificando si es necesario, pero estoy tratando de tener un poco de esperanza aquí.

Aquí hay un ejemplo del problema (lo siento por hacerte ver esto).

sNoteType = objSelection.Items[1].Selected ? 
    objSelection.Items[0].Selected ? 
    objSelection.Items[3].Selected ? 
    objSelection.Items[4].Selected ? 
    objSelection.Items[5].Selected ? 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "EV " : 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "LT " : 
    objSelection.Items[5].Selected ? 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "EV " : 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "BA " : 
    objSelection.Items[4].Selected ? 
    objSelection.Items[5].Selected ? 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "EV " : 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "LT " : 
    objSelection.Items[5].Selected ? 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "EV " : 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "LS " : 
    objSelection.Items[3].Selected ? 
    objSelection.Items[4].Selected ? 
    objSelection.Items[5].Selected ? 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "EV " : 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "LT " : 
    objSelection.Items[5].Selected ? 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "EV " : 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "BA " : 
    objSelection.Items[4].Selected ? 
    objSelection.Items[5].Selected ? 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "EV " : 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "LT " : 
    objSelection.Items[5].Selected ? 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "EV " : 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "FD " : 
    objSelection.Items[0].Selected ? 
    objSelection.Items[3].Selected ? 
    objSelection.Items[4].Selected ? 
    objSelection.Items[5].Selected ? 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "EV " : 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "LT " : 
    objSelection.Items[5].Selected ? 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "EV " : 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "BA " : 
    objSelection.Items[4].Selected ? 
    objSelection.Items[5].Selected ? 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "EV " : 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "LT " : 
    objSelection.Items[5].Selected ? 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "EV " : 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "LS " : 
    objSelection.Items[3].Selected ? 
    objSelection.Items[4].Selected ? 
    objSelection.Items[5].Selected ? 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "EV " : 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "LT " : 
    objSelection.Items[5].Selected ? 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "EV " : 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "BA " : 
    objSelection.Items[4].Selected ? 
    objSelection.Items[5].Selected ? 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "EV " : 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "LT " : 
    objSelection.Items[5].Selected ? 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty + "EV " : 
    objSelection.Items[2].Selected ? 
    string.Empty + "OV " : 
    string.Empty; 
+8

Ouch. Eso es todo lo que tengo. Lo siento. –

+11

Es posible que desee publicar esto en The Daily WTF. –

+0

Tanto CodeRush como ReSharper tienen pruebas gratuitas de sus productos que deberían ser lo suficientemente largas para que pueda limpiar este código. También puede justificar la compra de una licencia a su administración en función de su productividad al limpiar la base de códigos. – tawman

Respuesta

5

CodeRush Xpress (gratis) hace esto y mucho más. Ver here.

+0

En mi bruma de frustración, ni siquiera vi la versión de Xpress en su sitio. Gracias por señalarme aquí. –

8

ReSharper puede convertir el ternario a if/else.

De hecho, lo ejecuté a través de ReSharper, y la salida es igualmente aterradora. Te deseo la mejor de las suertes para refactorizar.

if (objSelection.Items[1].Selected) 
      if (objSelection.Items[0].Selected) 
       if (objSelection.Items[3].Selected) 
        if (objSelection.Items[4].Selected) 
         if (objSelection.Items[5].Selected) 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "EV "; 
         else 
         { 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "LT "; 
         } 
        else 
        { 
         if (objSelection.Items[5].Selected) 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "EV "; 
         else 
         { 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "BA "; 
         } 
        } 
       else 
       { 
        if (objSelection.Items[4].Selected) 
         if (objSelection.Items[5].Selected) 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "EV "; 
         else 
         { 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "LT "; 
         } 
        else 
        { 
         if (objSelection.Items[5].Selected) 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "EV "; 
         else 
         { 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "LS "; 
         } 
        } 
       } 
      else 
      { 
       if (objSelection.Items[3].Selected) 
        if (objSelection.Items[4].Selected) 
         if (objSelection.Items[5].Selected) 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "EV "; 
         else 
         { 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "LT "; 
         } 
        else 
        { 
         if (objSelection.Items[5].Selected) 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "EV "; 
         else 
         { 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "BA "; 
         } 
        } 
       else 
       { 
        if (objSelection.Items[4].Selected) 
         if (objSelection.Items[5].Selected) 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "EV "; 
         else 
         { 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "LT "; 
         } 
        else 
        { 
         if (objSelection.Items[5].Selected) 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "EV "; 
         else 
         { 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "FD "; 
         } 
        } 
       } 
      } 
     else 
     { 
      if (objSelection.Items[0].Selected) 
       if (objSelection.Items[3].Selected) 
        if (objSelection.Items[4].Selected) 
         if (objSelection.Items[5].Selected) 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "EV "; 
         else 
         { 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "LT "; 
         } 
        else 
        { 
         if (objSelection.Items[5].Selected) 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "EV "; 
         else 
         { 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "BA "; 
         } 
        } 
       else 
       { 
        if (objSelection.Items[4].Selected) 
         if (objSelection.Items[5].Selected) 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "EV "; 
         else 
         { 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "LT "; 
         } 
        else 
        { 
         if (objSelection.Items[5].Selected) 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "EV "; 
         else 
         { 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "LS "; 
         } 
        } 
       } 
      else 
      { 
       if (objSelection.Items[3].Selected) 
        if (objSelection.Items[4].Selected) 
         if (objSelection.Items[5].Selected) 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "EV "; 
         else 
         { 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "LT "; 
         } 
        else 
        { 
         if (objSelection.Items[5].Selected) 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "EV "; 
         else 
         { 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "BA "; 
         } 
        } 
       else 
       { 
        if (objSelection.Items[4].Selected) 
         if (objSelection.Items[5].Selected) 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "EV "; 
         else 
         { 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "LT "; 
         } 
        else 
        { 
         if (objSelection.Items[5].Selected) 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty + "EV "; 
         else 
         { 
          if (objSelection.Items[2].Selected) sNoteType = string.Empty + "OV "; 
          else sNoteType = string.Empty; 
         } 
        } 
       } 
      } 
     } 
+0

Gracias por la investigación. Es bueno saber que esta comunidad cuenta con el apoyo de usuarios como usted. Voy a usar la versión de CodeRush Xpress para no tener una herramienta dependiente que no pueda comprar más adelante. –

+0

Ese código me hace llorar. – Reid

1

Si tuviera que enfrentar una situación así, la usaría para investigar a Roslyn y ver cómo puede ayudar. Creo que desarrollar un complemento para VS, refactorizar la expresión ternaria que seleccione, cabría en un proyecto de "fin de semana".

http://blog.filipekberg.se/2011/10/23/exploring-how-to-write-a-code-analyzer-with-roslyn/ http://blogs.msdn.com/b/csharpfaq/archive/2011/11/03/using-the-roslyn-syntax-api.aspx

+0

¡Me gusta su enfoque de convertir este desastre en algo divertido! –

3

I convertidos por usted usando mi CodeRush Xpress

if (objSelection.Items[1].Selected) 
    if (objSelection.Items[0].Selected) 
     if (objSelection.Items[3].Selected) 
      if (objSelection.Items[4].Selected) 
       if (objSelection.Items[5].Selected) 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "EV "; 
       else 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "LT "; 
      else 
       if (objSelection.Items[5].Selected) 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "EV "; 
       else 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "BA "; 
     else 
      if (objSelection.Items[4].Selected) 
       if (objSelection.Items[5].Selected) 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "EV "; 
       else 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "LT "; 
      else 
       if (objSelection.Items[5].Selected) 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "EV "; 
       else 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "LS "; 
    else 
     if (objSelection.Items[3].Selected) 
      if (objSelection.Items[4].Selected) 
       if (objSelection.Items[5].Selected) 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "EV "; 
       else 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "LT "; 
      else 
       if (objSelection.Items[5].Selected) 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "EV "; 
       else 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "BA "; 
     else 
      if (objSelection.Items[4].Selected) 
       if (objSelection.Items[5].Selected) 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "EV "; 
       else 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "LT "; 
      else 
       if (objSelection.Items[5].Selected) 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "EV "; 
       else 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "FD "; 
else 
    if (objSelection.Items[0].Selected) 
     if (objSelection.Items[3].Selected) 
      if (objSelection.Items[4].Selected) 
       if (objSelection.Items[5].Selected) 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "EV "; 
       else 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "LT "; 
      else 
       if (objSelection.Items[5].Selected) 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "EV "; 
       else 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "BA "; 
     else 
      if (objSelection.Items[4].Selected) 
       if (objSelection.Items[5].Selected) 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "EV "; 
       else 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "LT "; 
      else 
       if (objSelection.Items[5].Selected) 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "EV "; 
       else 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "LS "; 
    else 
     if (objSelection.Items[3].Selected) 
      if (objSelection.Items[4].Selected) 
       if (objSelection.Items[5].Selected) 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "EV "; 
       else 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "LT "; 
      else 
       if (objSelection.Items[5].Selected) 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "EV "; 
       else 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "BA "; 
     else 
      if (objSelection.Items[4].Selected) 
       if (objSelection.Items[5].Selected) 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "EV "; 
       else 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "LT "; 
      else 
       if (objSelection.Items[5].Selected) 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty + "EV "; 
       else 
        if (objSelection.Items[2].Selected) 
         sNoteType = string.Empty + "OV "; 
        else 
         sNoteType = string.Empty; 

Sin embargo, esto sigue siendo muy feo. Yo sugeriría que use una tabla de verdad de seis dimensiones

string[,,,,,] table = new string[2,2,2,2,2,2]; 
table[0, 0, 0, 0, 0, 0] = "AA"; 
table[0, 0, 0, 0, 0, 1] = "BB"; 
table[0, 0, 0, 0, 1, 0] = "CC"; 
table[0, 0, 0, 0, 1, 1] = "DD"; 
... 

A continuación, se puede consultar como esto

string sNoteType = table[ 
    objSelection.Items[0].Selected ? 1 : 0, 
    objSelection.Items[1].Selected ? 1 : 0, 
    objSelection.Items[2].Selected ? 1 : 0, 
    objSelection.Items[3].Selected ? 1 : 0, 
    objSelection.Items[4].Selected ? 1 : 0, 
    objSelection.Items[5].Selected ? 1 : 0]; 
10

El significado del código es realmente mucho más simple de lo que parece. Continuando con ReSharper me encontró lo siguiente:

string sNoteType; 
var items = objSelection.Items; 

var item0Selected = items[0].Selected; 
string item3NotSelectedValue; 
if (items[1].Selected) 
{ 
    item3NotSelectedValue = item0Selected ? "LS " : "FD "; 
} 
else 
{ 
    item3NotSelectedValue = item0Selected ? "LS " : string.Empty; 
} 

if (items[2].Selected) 
{ 
    sNoteType = "OV "; 
} 
else 
{ 
    if (items[5].Selected) 
    { 
     sNoteType = "EV "; 
    } 
    else 
    { 
     if (items[4].Selected) 
     { 
      sNoteType = "LT "; 
     } 
     else 
     { 
      if (items[3].Selected) 
      { 
       sNoteType = "BA "; 
      } 
      else 
      { 
       sNoteType = item3NotSelectedValue; 
      } 
     } 
    } 
} 

Desde Jon hizo todo el trabajo duro, aquí es una edición que Creo hierve abajo a la esencia. Obviamente, te gustaría poner pruebas alrededor de este código lo antes posible, ya que no puedo imaginar cometer un error al decodificar esta monstruosidad, y la refactorización automatizada solo te va a llevar tan lejos (no muy, desde el aspecto de las muestras colocan aquí):

var items = objSelection.Items; 
string sNoteType = string.Empty;  
if (items[0].Selected && items[1].Selected) { 
    sNoteType = "LS "; 
} else if (items[1].Selected) { 
    sNoteType = "FD "; 
} else if (items[2].Selected) { 
    sNoteType = "OV "; 
} else if (items[3].Selected) { 
    sNoteType = "BA ";  
} else if (items[4].Selected) { 
    sNoteType = "LT "; 
} else if (items[5].Selected) { 
    sNoteType = "EV "; 
} 
5

este código debe comportarse de forma idéntica a la monstruosidad originales:

string sNoteType; 
if (objSelection.Items[2].Selected) 
{ 
    sNoteType = "OV "; 
} 
else if (objSelection.Items[5].Selected) 
{ 
    sNoteType = "EV "; 
} 
else if (objSelection.Items[4].Selected) 
{ 
    sNoteType = "LT "; 
} 
else if (objSelection.Items[3].Selected) 
{ 
    sNoteType = "BA "; 
} 
else if (objSelection.Items[0].Selected) 
{ 
    sNoteType = "LS "; 
} 
else if (objSelection.Items[1].Selected) 
{ 
    sNoteType = "FD "; 
} 
else 
{ 
    sNoteType = string.Empty; 
} 

para llegar a esta empecé con la suposición de que cualquiera que sea el código está haciendo actualmente es correcta. Luego escribí un guión para generar 64 casos de prueba, uno para cada combinación de valores de verdad.Imagine un montón de esto:

[TestCase("EV ", "000001")] 
[TestCase("LT ", "000010")] 
[TestCase("EV ", "000011")] 
[TestCase("BA ", "000100")] 
[TestCase("EV ", "000101")] 

Entonces eyeballed los patrones y ha añadido sentencias if uno por uno hasta que el monstruo ya no era necesario en absoluto. No puedo garantizar que así es como el autor original imaginaba la lógica, pero I puede garantizar que se comporte de forma idéntica en todos los casos posibles.

Cuestiones relacionadas