2 ms·
This works for simple little functions, but if someone was going to use prolog for anything complex, it would quickly be impossible. There aren't going to be fu
by knome 4y ago
This works for simple little functions, but if someone was going to use prolog for anything complex, it would quickly be impossible. There aren't going to be functions that take a rendered page and an alist of values and return the template. Or that reverse hashing. Or really anything very complex.
For using prolog in its original purpose as a database of queryable facts and rules, this is useful, but as a general purpose programming language, I think it's more of a parlor trick.
- dreamcompiler 4y agoI don't think it's really about "simple" functions per se. Bidirectionality is useful where function inversion is meaningful (i.e. not for hashing) and where the domain of the function is explicitly finite or otherwise bounded by constraints. That's exactly the situation when querying databases. Such queries can get quite complicated. Agreed that it's not that useful for GP programming, but it's very useful for databases and constraint management systems.