Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
How I accidentally learned Prolog (jcoglan.com)
4 points by ingve on Jan 1, 2018 | hide | past | favorite | 1 comment


Very nice, thank you for sharing!

I have one comment on the naming convention. Consider has_type/3 from the post. For example:

    has_type(_, true, bool).
A better name for this would be:

    term_type(_, true, bool).
or even:

    context_term_type(_, true, bool).
This makes clear what each of the arguments means, and does not limit the reading to only one direction of use. Note that we can query this also in other directions, and the predicate still makes sense!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: