[LLVMdev] Dynamic typing

me22 me22.ca at gmail.com
Sat May 2 12:14:33 PDT 2009

On Sat, May 2, 2009 at 14:47, Thomas Gatzweiler
<thomas.gatzweiler at googlemail.com> wrote:
> I've spent many time trying to find a solution but I have no idea how to
> create a dynamically typed scripting language like Python and Ruby with
> Is there any way to realize this?

Well "dynamically typed" really just means "trivially statically
typed", where everything has type variant<string, integer, real,
function, hashtable, pointer>, so presumably you'd have functions that
do the double dispatch and do the right thing.  Then you would likely
write some analysis that would tell you what types are possible from
the various expressions, and then optimize the dispatch accordingly.
(I suppose if you were lucky, constant propagation, folding, inlining,
and DCE would do much of that for you.)

~ Scott

More information about the llvm-dev mailing list