giovinazzo-kevin / Ergo

Other
4 stars 0 forks source link

Directives should take multiple arguments and the parentheses should be omitted #93

Open giovinazzo-kevin opened 5 months ago

giovinazzo-kevin commented 5 months ago

Some directives need to be repeated for each of their arguments, when they could take a list of arguments instead.

e.g.

:- inline(pred_a).
:- inline(pred_b).

should be

:- inline(pred_a, pred_b)

or

:- inline([pred_a, pred_b])

TODO: Make a list of directives that need to be changed and analyze it

giovinazzo-kevin commented 5 months ago

Additionally, directives are basically just complex terms right now, but in ISO Prolog they do away with the parentheses:

:- inline pred_a, pred_b.

would be the ideal form

giovinazzo-kevin commented 3 months ago

I fixed one part of this by allowing variadic directives.

However I'm not sure whether removing the parentheses is worth it.