[Asterisk-Dev] Dialplan syntax changes.. Option: work on a
radically different design..
Edwin Groothuis
edwin at mavetju.org
Wed May 18 15:55:55 MST 2005
On Wed, May 18, 2005 at 12:58:31PM -0400, alex at pilosoft.com wrote:
> On Wed, 18 May 2005, Tilghman Lesher wrote:
> Obviously. However, whoever is going to be implementing new (C-ish or
> perl-ish or whatever-ish) dialplan should think about bigger picture and
> consider against reinventing the wheel.
As somebody who has implemented (one time as a patch, one time from
scratch) embedded scripting language in a MUD (Multi User Dungeon,
an hack-and-slash game on the internet), I would like to share my
experiences:
Don't reinvent the wheel again.
Take a language and interpreter which is already there and has shown
it works. If you don't, and don't have enough experiences with
creating scripting languages (which the original author I got the
patch from didn't have (but neither did I :-)) you end up with a
beast which most of the time does do the things you want it to (more
or less), but if it breaks because of bad syntax of the scripts
(null-pointer anybody?) and you don't know where to start, you'll
go grey very fast.
The new scripting language we developed was a TCL interpreter (just
used libtcl.so, no changes to it) with a handfull of extensions
inside the MUD code to access the internal information of the MUD
from within the TCL code.
At that moment we had:
- proper functions
- proper variable handling
- proper flowcontrol
- proper errorhandling
- a scripting language which was easy to learn
- a scripting language which was easy to extend
The quality of the interaction between the players and the objects
in the MUD skyrocketed and the speed of implementation of the
feedback from the builders on additional features they wanted showed
that it was really easy to implement without having to worry about
the quality of the code of the MUD nor of the stability of the MUD.
Just my two cents, Edwin
http://www.fataldimensions.org/building/mobprogs.php, but that gives
only the documentation. See
http://sourceforge.net/projects/fataldimensions/ for the code.
--
Edwin Groothuis | Personal website: http://www.mavetju.org
edwin at mavetju.org | Weblog: http://weblog.barnet.com.au/edwin/
More information about the asterisk-dev
mailing list