3 ms·
I liked the idea behind Prolog, but I absolutely detest the syntax. IMO it would be better to have something like Prolog as part of a "better designed" langua
by shevy-java 9mo ago
I liked the idea behind Prolog, but I absolutely detest the syntax.
IMO it would be better to have something like Prolog as part of a
"better designed" language per se. I can't come up with a good
proposal myself - language design is hard, including syntax design -
but imagine if Prolog would be a part of python. That feature would
then be used by more people. (This is just an example; just randomly
creeping in features into a more successful language, also often won't
work. I am just giving this as an example that MIGHT be better.)
- dragonwriter 9mo ago“Something like Prolog” as a part of a more traditional language is kind of the idea of miniKanren, which has been implemented for many languages: https://minikanren.org/ https://minikanren.org/
- YeGoblynQueenne 9mo agoThe syntax of Prolog is (a fragment of) the syntax of First Order Logic. It's not supposed to look like your friendly neighbourhood programming language because it's mathematical notation. Count yourself lucky you (probably) learned programming in a language like Java or Python, and not, say, FORTRAN. Because then you'd really pray for the simplicity and elegance of definite clauses. (Or not. FORTRAN programmers can write FORTRAN in any language, even FORTRAN).
- subjectsigma 9mo agoThe syntax of Prolog is important! Since Prolog programs are just Prolog data structures, it is easy to write Prolog meta-interpreters which generate or consume Prolog code. https://www.youtube.com/watch?v=nmBkU-l1zyc https://www.youtube.com/watch?v=nmBkU-l1zyc