Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Remove stops-based *Function constructors #12258

Merged
merged 5 commits into from
Jun 29, 2018
Merged

Remove stops-based *Function constructors #12258

merged 5 commits into from
Jun 29, 2018

Conversation

jfirebaugh
Copy link
Contributor

Remove stops-based *Function constructors. Another step towards #11247.

Copy link
Contributor

@1ec5 1ec5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! The DSL is pretty handy for these tests.

Copy link
Contributor

@anandthakker anandthakker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍 the dsl is such a satisfying cleanup


std::unique_ptr<Expression> eq(std::unique_ptr<Expression> lhs,
std::unique_ptr<Expression> rhs) {
return std::make_unique<Equals>(std::move(lhs), std::move(rhs), false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and the other non-compound-expression-based DSL functions bypass type validation. Since the DSL now lowers the barrier to creating expressions directly, without parsing/validation, I think it's worthwhile to include some asserts on the input expressions' types in the various expression constructors.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants