Skip to content

get rid of the fourth argument of maketerm, type #36

@nsajko

Description

@nsajko

maketerm(T, head, children, type=nothing, metadata=nothing)

Constructs an expression. [...], type is the type of the S-expression.

What is the meaning of the type argument here? "Type of the sexp" means nothing to me, sexps don't have type?

Originally posted by @nsajko in #25 (comment)

The fourth argument, type, seems like it's not generally useful for expressions, and redundant with the next argument, metadata. Is there any reason why it should exist in this interface?

I notice that the in-development version of Metatheory.jl that supports the current TermInterface.jl always ignores both type and metadata, and so will my package. EDIT: actually my package does use metadata for some types.

Was type only introduced to make things slightly more convenient for the SymbolicUtils.jl implementation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions