Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A while back I wrote a Scheme interpreter in Prolog. I would recommend nobody use it. Nor would I recommend writing Scheme in Prolog.

https://github.com/FigBug/scheme



If you have time, I'd be curious for your reasons not to use Prolog to implement scheme. I've been playing with Prolog lately and to my newbie eyes it seems like it would be a good host language for interpreters.

My email is in my profile if you'd rather email me directly rather than dumping something controversial here.


You might find interesting to read:

"Syntax and Semantics of Programming Languages"

http://homepage.cs.uiowa.edu/~slonnegr/plf/Book/

this is a free version of:

http://www.amazon.com/Formal-Syntax-Semantics-Programming-La...

the implementations are in Prolog.


Thanks for the links, I'll take a look at that.


It was a long time ago, and I was a newbie as well, but I just remember it being one of the more painful things I've done. Coming from C, I remember it being a mix of amazing easy and amazingly hard. Things that would be 100s of lines of C were one or two lines of Prolog. But sometimes figuring out those few lines and debugging them was a huge pain. I still find Prolog hard to follow, you can't just read it in order like imperative languages.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: