3 ms·
I work on an ancient, legacy system that manages company car rentals, written in Visual Prolog. Visual Prolog is an ojbect-oriented, typed, compiled, version of
by YeGoblynQueenne 4y ago
I work on an ancient, legacy system that manages company car rentals, written in Visual Prolog. Visual Prolog is an ojbect-oriented, typed, compiled, version of Prolog, so it's very, very different than ordinary Prolog ("ordinary" for me anyway).
To be honest, it's not the most exciting system to be working on. It's basically using Prolog to encode business rules and perform calculations that you would sometimes expect to see in a spreadsheet (but then, there are parallels between logic programming and spreadsheets, e.g. see [1,2]). Prolog of course is a great language for that sort of use. On the other hand, I think the idea of turning Prolog into an object-oriented language is the worst idea of all times. I mean, when I quit my job in the industry to do a PhD, a big draw was that I could work with Prolog, but not OOP. And now I'm back in the industry working with an OOP Prolog. Resistance is futile.
The fun part is that the project I'm working on has been developed over 20 years by multiple people with very, ah, let's say varied opinions on the necessity of maintainability of old code. There are missing sources, old configurations that break compilation, no structured comments whatsoever, no version control (NO VERSION CONTROL!!! AAAAAH!!!), about 1/10th of the LOCs are commented-out for reasons unknown and unspecified in any comments, and so on, so forth.
So it's really cool to work with. I absolutely love digital archeology! :D
_________________
[1] https://www.j-paine.org/spreadsheet_structure_discovery.html https://www.j-paine.org/spreadsheet_structure_discovery.html
[2] https://dl.acm.org/doi/10.1145/67449.67466 https://dl.acm.org/doi/10.1145/67449.67466
- pjmlp 4y agoNow that is a name I didn't saw for a while. I remember the ads in Dr Dobbs! Thanks for sharing.
- mst 4y agoI keep seriously considering trying https://logtalk.org/ 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.
- YeGoblynQueenne 4y agoWell, 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.