scryer-prolog
scryer-prolog copied to clipboard
Incomplete Reduction Error on dynamic directive.
I don't think this is correct behavior:
?- :-dynamic hello/1. error(syntax_error(incomplete_reduction),read_term/3:1). ?-
doug@kite:~/code/scryer-prolog$ scryer-prolog -v
v0.9.4-614-gaa3d8b8f
doug@kite:~/code/scryer-prolog$
dynamic is not an operator: https://github.com/mthom/scryer-prolog/issues/178#issuecomment-537597141, IMO it is expected behavior same as for:
?- a b c.
error(syntax_error(incomplete_reduction),read_term/3:1).
As @hurufu said, this is correct behavior. But it's not friendly behavior.
The key part of the error (incomplete_reduction) is aggressively opaque to newcomers. When such an error is unhandled, the interpreter should print a prose description what the error means, like how the Rust compiler does.