www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D interpreter?

reply Brendan <brenzie gmail.com> writes:
It would be a great boon if there were a D interpreter where you just 
write some code to try out. The most obvious advantage I see is that it 
would become a lot easier to learn D, especially if it's one's first 
language.

Another advantage I see is that it possibly attracts more people towards 
D, which could further D's advance to become a mainstream language 
(which is one of D's goals, I presume). This perhaps in turn would 
provide more books written on D by people who know much about it, which 
would possibly attract even MORE people to D. Well, you get the basic 
point which is cause and effect.

If I had the skill, I'd start up such a project myself, but alas. So, 
I'm just throwing in the suggestion (which I think was suggested at 
least once before).
Sep 03 2008
next sibling parent reply bearophile <bearophileHUGS lycos.com> writes:
Brendan:
 It would be a great boon if there were a D interpreter where you just 
 write some code to try out.
Recently someone has shown here a probably very nice exec module/system (I don't remember the name and author, sorry, someone else can help you), to execute D code dynamically. But despite looking cool I have not succeed making it work, and everyone seem to have ignored it. You can take that project and create what you want, it's not an interpreter, but maybe it's fast/good enough for interactive use, to learn D syntax, try snippets of code, etc (basically some of the things the Python/ Scheme / etc REPL are good for). Note that lot of people coming from statically typed languages like C++ may ignore your words, because they don't understand why a REPL is so useful, so you have to teach/explain them carefully :-) Bye, bearophile
Sep 03 2008
next sibling parent reply BLS <nanali nospam-wanadoo.fr> writes:
bearophile schrieb:
 Brendan:
 It would be a great boon if there were a D interpreter where you just 
 write some code to try out.
Recently someone has shown here a probably very nice exec module/system (I don't remember the name and author, sorry, someone else can help you), to execute D code dynamically. But despite looking cool I have not succeed making it work, and everyone seem to have ignored it. You can take that project and create what you want, it's not an interpreter, but maybe it's fast/good enough for interactive use, to learn D syntax, try snippets of code, etc (basically some of the things the Python/ Scheme / etc REPL are good for). Note that lot of people coming from statically typed languages like C++ may ignore your words, because they don't understand why a REPL is so useful, so you have to teach/explain them carefully :-) Bye, bearophile
Burton Radons, news://news.digitalmars.com:119/fp0af9$10jh$1 digitalmars.com hth bjoern
Sep 03 2008
parent Brendan <brenzie gmail.com> writes:
BLS wrote:
 bearophile schrieb:
 Brendan:
 It would be a great boon if there were a D interpreter where you just 
 write some code to try out.
Recently someone has shown here a probably very nice exec module/system (I don't remember the name and author, sorry, someone else can help you), to execute D code dynamically. But despite looking cool I have not succeed making it work, and everyone seem to have ignored it. You can take that project and create what you want, it's not an interpreter, but maybe it's fast/good enough for interactive use, to learn D syntax, try snippets of code, etc (basically some of the things the Python/ Scheme / etc REPL are good for). Note that lot of people coming from statically typed languages like C++ may ignore your words, because they don't understand why a REPL is so useful, so you have to teach/explain them carefully :-) Bye, bearophile
Burton Radons, news://news.digitalmars.com:119/fp0af9$10jh$1 digitalmars.com hth bjoern
I can't seem to access that.
Sep 04 2008
prev sibling parent reply Brendan <brenzie gmail.com> writes:
bearophile wrote:
 Brendan:
 It would be a great boon if there were a D interpreter where you just 
 write some code to try out.
Recently someone has shown here a probably very nice exec module/system (I don't remember the name and author, sorry, someone else can help you), to execute D code dynamically. But despite looking cool I have not
succeed making it work, and everyone seem to have ignored it. You can take that project and create what you want, it's not an interpreter, but maybe it's fast/good enough for interactive use, to learn D syntax, try snippets of code, etc (basically some of the things the Python/ Scheme / etc REPL are good for).
 Note that lot of people coming from statically typed languages like C++ may
ignore your words, because they don't understand why a REPL is so useful, so
you have to teach/explain them carefully :-)
 
 Bye,
 bearophile
I think I have misplaced that word 'interpreter' or maybe not. What I meant was an interactive environment, much like you have with 'ghci' for Haskell. So I guess that abbreviation you used, 'REPL', is more like it. I can see why some would not care for such a thing, but I think they shouldn't be the aim at all if we're talking about usage of a D REPL. But they may be the aim if it's about the creation of one :) But certainly they would at least understand the advantage of one?
Sep 04 2008
parent reply bearophile <bearophileHUGS lycos.com> writes:
Brendan:
 But certainly they would at least understand the advantage of one?
Build it, and I think they will come :-) If it becomes good enough then it may be integrated into the standard distribution of D compilers. Bye, bearophile
Sep 04 2008
parent Brendan <brenzie gmail.com> writes:
bearophile wrote:
 Brendan:
 But certainly they would at least understand the advantage of one?
Build it, and I think they will come :-) If it becomes good enough then it may be integrated into the standard distribution of D compilers. Bye, bearophile
I would certainly like to make one, but I'm just not a good enough programmer (programming is not my main field). I don't even have much of an idea of how to start or how to continue an existing D REPL project. At the moment I'm translating a simple little C++ practice project I had to D, and improving it a bit, and while it doesn't give me much trouble, going beyond such a little project would be quite difficult for me. So you can see that I'm not that hardcore as some of you.
Sep 04 2008
prev sibling parent reply bearophile <bearophileHUGS lycos.com> writes:
Brendan:
 I can't seem to access that.
Try this: http://members.shaw.ca/burton-radons/The%20Joy%20and%20Gibbering%20Terror%20of%20Custom-Loading%20Executables.html Bye, bearophile
Sep 04 2008
parent Brendan <brenzie gmail.com> writes:
bearophile wrote:
 Brendan:
 I can't seem to access that.
Try this: http://members.shaw.ca/burton-radons/The%20Joy%20and%20Gibbering%20Terror%20of%20Custom-Loading%20Executables.html Bye, bearophile
Looks interesting. Maybe if I'm adventurous I'll take some potshots at it.
Sep 04 2008