Follow-up Comment #17, bug #8522 (project wesnoth):

the user-visible description is generated from the unique description as a
matter of backward compatability and as a shortcut for scenario designers. 
Historically, there didn't used to be a distinction between the two.  At some
point the user visible description was seperated from the description so that
the user could change the name of a unit, without changing the scenarios WML
that depended on the underlying description.  So, on the one hand, removing
this 'feature' would make the c++ code a little more elegant, but would make
scenario WML a little less elegant.  Since it would do the latter, I feel
that a wider concensus amongst the WML users.  Hence the forum thread where
this conversation has continued.

This actually should answer your second question as well.  The most important
reason why units have unique underlying descriptions is as WML variables that
can be filtered on in scenarios either for events or to tell the AI what to
do.  It is therefore necessary that they be human readable.  In order to
preserve state over save-reloading, they would need to be stored in a WML
variable anyways.  Creating another variable for the AI to use as its own
unique identifier would lead to an undesirable split in the way WML controls
events and the AI.

Finally, your assertion that C++ code should be designed with more interest
in efficiency, while commendable sometimes, is not strictly true.  C++ code
should be designed with more interest in efficiency only when the efficiency
in question leads to significant performance improvements.  I do not believe
we are anywhere near the state where this is true of the code we are
discussing here.  Under such circumstances, clarity is far preferable to
efficiency.

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?8522>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to