You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of my all time favorite language features is the ability to define new operators and override the definitions of existing ones.
It makes creating minimally verbose DSLs in a base language significantly easier and it is probably the next best thing to providing full support for hygienic macros. See: #153
Pereira and Shieber "Prolog and Natural-Language Analysis" (ISBN 0-937073-18-0) leans on this language feature in defining a meta-circular interpreter.
Section "5.5 Declaring Operators" in Clocksin, W.F., and Mellish C.S. "Programming in Prolog" first introduced this concept to Prolog.
The text was updated successfully, but these errors were encountered:
One of my all time favorite language features is the ability to define new operators and override the definitions of existing ones.
It makes creating minimally verbose DSLs in a base language significantly easier and it is probably the next best thing to providing full support for hygienic macros. See: #153
Here are few links to discussions of the topic :
https://www.swi-prolog.org/pldoc/man?section=operators
https://www3.cs.stonybrook.edu/~sbprolog/manual1/node45.html
https://cs.union.edu/~striegnk/learn-prolog-now/html/node84.html
And Gunnar Gotshalks' "Defining Binary & Unary Operators" provides an extended treatment of the feature in a slide deck at:
https://www.eecs.yorku.ca/course_archive/2008-09/S/3401/calendar/24%20prolog%20-%20operators%20.pdf
Pereira and Shieber "Prolog and Natural-Language Analysis" (ISBN 0-937073-18-0) leans on this language feature in defining a meta-circular interpreter.
Section "5.5 Declaring Operators" in Clocksin, W.F., and Mellish C.S. "Programming in Prolog" first introduced this concept to Prolog.
The text was updated successfully, but these errors were encountered: