3 ms·
The main issue with Prolog is not its syntax. Like scheme/lisp the syntax is dead simple once you get the hang of it. The main issues are: - The language is u
by sidkshatriya 5y ago
The main issue with Prolog is not its syntax. Like scheme/lisp the syntax is dead simple once you get the hang of it.
The main issues are:
- The language is untyped. In some ways you get more power because it it untyped but then it becomes more difficult to build/understand/maintain/refactor larger programs
- Debugging the language is quite difficult. There are some really interesting videos/resources at the "Power of Prolog" [1] that give you tips on how to debug. IIRC many of those tips only apply to "pure" Prolog (a certain class of Prolog programs that don't do things like modify global state etc). Essentially you can keep making your Prolog goals more and more general to home into the bug.
But to answer your question, I am not aware of any "ReasonML" equivalent of Prolog. ReasonML just differs on the "surface" level with OCaml. The internal type system, compilation pipeline etc. is all OCaml. ReasonML as a project makes sense for the OCaml ecosystem because OCaml is typed language and has a sophisticated syntax. Prolog's syntax is SUPER simple. So its not really possible to have too much of a different take on syntax when it comes to Prolog.
In Prolog essentially we have
Head :-
Body
This could become transformed to:
if Body then Head
In other words, there is not much room for syntax innovation as there existed in OCaml when ReasonML came out as alternate (surface) syntax.
You have other languages like Mercury which try to be a typed version of Prolog. They are significantly different languages in their own right so I wouldn't classify them in the "ReasonML" equivalent category.
[1] https://www.metalevel.at/prolog https://www.metalevel.at/prolog by Triska (I highly recommend this resource)
- HelloNurse 5y agoIf Prolog syntax is too basic to be innovated, is there something useful and complex that could be described with new syntax? Examples in other languages include adding classes and objects to Pascal with a handful of keywords or adding lambda functions to C++ and to Java with recycled punctuation.
- dragonwriter 5y ago> If Prolog syntax is too basic to be innovated, is there something useful and complex that could be described with new syntax? You could add a couple of communication primitives and have Erlang. But...it’s been done.