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

I keep seriously considering trying https://logtalk.org/ to get myself object orientation in prolog - haven't done so yet, expressing no opinion as to whether it's a good idea in practice, but it definitely looks like it'd be fun to play with.


Well, Paulo (Moura, logtalk maintainer) has done an amazing job and I don't want to disparage it. I still think it's a bad idea to make an OOP Prolog. I think it's a bad idea to do anything to Prolog to make it more like something else. Prolog is a unique jewel of computer science, with unique flaws and unique virtues, and I am pretty convinced that there is nothing that can make it better, without breaking the delicate balances that make it absolutely amazing the way it is. There have been many efforts to "make a better Prolog" (never explicitly articulated like that), for example, Answer Set Programming, or Datalog, I guess. Everytime someone tries to do that, they break Prolog irreparably: Datalog and ASP can't even use lists; ASP has to ground the entire program and then hand off to an NP-complete solver.

As to OOP, I think I'm not alone when I say that I've seen the horrors that people create when given the freedom to instantiate their classes, and I will never unsee them. A great idea, but so was the Industrial Revolution, and now we have climate change.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: