Template talk:Convert/complexity

This is the talk-page for: Template:Convert/complexity.

Reducing overall complexity
The complexity of Template:Convert has been noted by several people, who have wondered if it could be simplified, or if there would an easier way to implement Convert on other wiki websites. Because Convert has features to determine the precision of numbers as used, and to format fractions in amounts, multipe subtemplates are used for even a basic conversion. Consider the conversion of m-to-feet, as an example of invoking many nested subtemplates. There have been 18 templates being used for m-to-ft conversions:


 * Template:Convert (view source) (protected)
 * Template:Convert/LoffAoffDbSoff (view source) (protected)
 * Template:Convert/LoffAonSoff (view source) (protected)
 * Template:Convert/ft (view source) (protected)
 * Template:Convert/m (view source) (protected)
 * Template:Convert/numdisp (view source) (protected)
 * Template:Convert/numdisp/a
 * Template:Convert/round (view source) (protected)
 * Template:Max/2 (view source) (protected)
 * Template:Ordomag (view source) (protected)
 * Template:Ordomag/x (view source) (protected)
 * Template:Precision (view source) (protected)
 * Template:Precision/0 (view source) (protected)
 * Template:Precision/00 (view source) (protected)
 * Template:Precision/a (view source) (protected)
 * Template:Rnd (view source) (protected)
 * Template:Rnd/b1 (view source) (protected)
 * Template:Rnd/c4dec0 (view source) (protected)

Previously, Template:Rnd had been invoking a subtemplate named Template:Rnd/a, but that was bypassed in a prior update, to reduce the nesting of the subtemplates. -Wikid77 (talk) 07:01, 30 May 2010 (UTC)