comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: reference to a name variable
Date: Thu, 23 Jul 2009 22:26:15 +0200
Date: 2009-07-23T22:26:14+02:00	[thread overview]
Message-ID: <1xwokx2f7b5np.uqcsbkgyedg9.dlg@40tude.net> (raw)
In-Reply-To: 2c3059c2-e454-4746-9abe-ae9a12867169@b15g2000yqd.googlegroups.com

On Thu, 23 Jul 2009 13:02:25 -0700 (PDT), Hibou57 (Yannick Duch�ne) wrote:

> What you are looking for seems to be a kind of metaprogramming,
> something like handling the code as if it was data (Lisp back once
> again in the Ada world ?)

> I do not know any built-in of this kind in Ada, so I will suggest to
> design the application so that variables which would have to be
> accessible this way, would be registered in a list of string <->
> access associations (just an example implementation, and standard Ada
> containers would be well suited here).

A map would be even better suited for that.

(What was requested is not a variable, a named scoped object.)

> You may also think about a kind of simple interpreter for your input
> and create an interpretation function in the application. If the input
> language is as simple as a set of string interpreted as requests for
> some value, you may have a function taking a string as argument and
> returning either a reference to an object an explicitely typed value.

Yes, it is a right idea not to mix these two languages keeping them apart.

However, a need in some interpreted domain-specific languages is very
overestimated. In the automation area, customers are frequently asking for
this. We promptly supply them with a tailored scripting language they want,
knowing in advance that they will never ever use it. That would be just too
expensive for them, requiring personal training, permanent use, just mental
efforts nobody wanted to invest. But they are always certain that they
utterly need it... (:-))

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2009-07-23 20:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-23 19:08 reference to a name variable Pablo
2009-07-23 20:02 ` Hibou57 (Yannick Duchêne)
2009-07-23 20:26   ` Dmitry A. Kazakov [this message]
2009-07-24 11:03 ` Stephen Leake
2009-07-28 13:51   ` Chrono
2009-07-28 18:25     ` Ludovic Brenta
2009-07-30 14:37       ` Chrono
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox