URL:
<http://gna.org/bugs/?13157>
Summary: Treat objects as maps (like JavaScript does) in
FormulaAI
Project: Battle for Wesnoth
Submitted by: seahen
Submitted on: Tuesday 03/10/2009 at 05:20
Category: Feature Request
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: WML
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 1.5.10+svn (32849)
Operating System: all
_______________________________________________________
Details:
In FormulaAI, the only difference I can see between the dump of an object and
the dump of a map is that the former has curly brackets and the latter has
square.
Why not change the curly brackets to square and treat objects as maps, the
way JavaScript does? This would make it possible to:
* perform runtime duck typing.
* copy an object and add new custom properties to the copy.
* create dummy units, hexes, moves etc. that would have some or all of the
properties of real ones.
FAI already has weak dynamic typing, so let's take advantage of all the
features that weak dynamic typing offers.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?13157>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs