On Tue, Dec 1, 2009 at 11:43 AM, Don <nos...@nospam.com> wrote: > Bill Baxter wrote: >> >> On Tue, Dec 1, 2009 at 5:18 AM, Lutger <lutger.blijdest...@gmail.com> >> wrote: >>> >>> Ary Borenszweig wrote: > >>>>>>>> The feature isn't very dynamic since the dispatch rules are defined >>>>>>>> statically. The only thing you can do is rewire the associative > >>> I don't get it, what if WhatTypeToPutHere does a dynamic lookup, then >>> it's >>> pretty much the same a Javascript isn't it? Except that everything in >>> Javascript does dynamic lookup and in D you are restricted to types that >>> have this dynamic lookup (which, pending a phobos solution you have to >>> code >>> yourself). Do you mean to say this 'except' is the obstacle somehow? >>> > >>> How is that less dynamic? You would be able to call or even redefine at >>> runtime, for example, signals defined in xml files used to build gui >>> components. >> >> It is a bit less dynamic because in D it's all done with templates. > > It's a helluva lot more dynamic in D because it can do code generation on > request. The "dynamic" bit in Javascript is really an AA lookup, + > reflection.
But that's code generation /at compile time/. You can call that "more dynamic" if you like, but it seems to fall more in the realm of what is considered "static" to me. Doesn't mean it's not really useful, but calling it dynamic seems to be stretching the traditional definition a bit too far. --bb