"H. S. Teoh" <hst...@quickfur.ath.cx> wrote in message news:mailman.713.1331843912.4860.digitalmar...@puremagic.com... > On Thu, Mar 15, 2012 at 04:13:42PM -0400, Nick Sabalausky wrote: >> "H. S. Teoh" <hst...@quickfur.ath.cx> wrote in message >> news:mailman.709.1331842273.4860.digitalmar...@puremagic.com... >> > On Thu, Mar 15, 2012 at 09:15:34PM +0200, Manu wrote: >> >> On 15 March 2012 20:59, so <s...@so.so> wrote: >> > [...] >> >> > On Thursday, 15 March 2012 at 17:30:49 UTC, Adam D. Ruppe wrote: >> > [...] >> >> >> I just talked about D because D rox, but if you are doing it for >> >> >> education, Lisp is a good choice because it is fairly unique. >> >> >> >> >> > >> >> > I'd love to use D but it is not an option is it? At least for the >> >> > things i am after, say game scripting. >> >> >> >> >> >> I dunno, that sounds like a pretty interesting idea to me! :) >> > >> > It certainly is, though it does bring up the problem of what to do >> > if the game scripting is editable at runtime. Does that mean we'll >> > need to bundle a D compiler with the game? Doesn't seem practical. >> > >> >> Why not? > [...] > > So your game will have to ship with dmd and optlink bundled? >
As long as it's a platform on which dmd runs, and you have permission from Walter, I don't see the problem with that. Sure, it'd be another thing to deal with in the installation/packaging scripts, but it shouldn't be too bad. Plus, people have already done the same sort of thing with Python/Ruby (not sure about games, but other apps). Yea, scripting in Python/Ruby is probably super-easy if your app is already written in Python/Ruby, but when isn't then you're really just doing the same thing as you would to do your scripting in D. 'Course, if you *like* dynamic interpreted languages, then yea, just simply using Lua would be easier. Point is though, I don't think I'd say it's impractical with D. At least for desktop/laptop games anyway (platforms dmd doesn't run *on* could still use D for scripting, but just not edited in-game - could still reload in-game if the platform has dynamic lib support, but it'd be compiled off-line...possibly even by the game sending the code to a compile server). And all that would only matter for user-generated content. Any built-in scripts would naturally just already come pre-built. Hell, they could even come statically-linked if you wanted - develop them using the dynamic editing tools, and then statically link when you're ready to ship. Speaking of such things, I wonder how hard it would be to port dmd to run on another platform? Targeting that platform might be a lot of work, but just making it run on it...it *is* written in C++, probably the second-most common language in the world (just behind straight C), and it's not like it does a bunch direct hardware I/O access, or GUI, or anything like that. So I'd imagine mostly just some occasional OS calls and assembly. Don't know how much of that there is in there. > -- > "The number you have dialed is imaginary. Please rotate your phone 90 > degrees and try again." I love this one :)