Skip to content
This repository was archived by the owner on Aug 15, 2018. It is now read-only.
This repository was archived by the owner on Aug 15, 2018. It is now read-only.

rename the/2 #10

@mndrix

Description

@mndrix

I've come to dislike how I named the/2. For one, it makes it sound like a variable has only one value. That's confusing in code like

the(integer, X),
member(X, [1,2,3,4]),

I wonder if var(X, Type) would be better. That looks a lot like a variable declaration. It also puts the type name after the variable, which matches the PlDoc format: X:type.

var(X, integer),
member(X, [1,2,3,4]),

There's still a little bit of confusion because var(X) fails if X is not a variable. However, var(X,Type) succeeds as long as X has the proper type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions