Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor eval code #1591

Merged
merged 15 commits into from
Feb 4, 2024
Merged

Refactor eval code #1591

merged 15 commits into from
Feb 4, 2024

Conversation

joelim-work
Copy link
Collaborator

Based on #1569 (comment), I have decided to submit this as an alternative to #1569.

In my opinion, converting the switch statement into a map[string]func adds significant overhead (as well as an extra layer of indirection), and the main focus should be to deduplicate the logic for evaluating the setExpr object. I have also applied the same change to setLocalExpr as well. Regarding complete.go, I think it is better to leave it for a separate PR.

@gokcehan, @Michael-Gallo Please let me know what you think.

@Michael-Gallo
Copy link
Contributor

Looks good to me, closing my PR

@ilyagr
Copy link
Collaborator

ilyagr commented Feb 3, 2024

I haven't looked this over carefully, but it certainly looks like an improvement. Nice! :)

@joelim-work joelim-work merged commit 8374080 into gokcehan:master Feb 4, 2024
4 checks passed
@joelim-work joelim-work deleted the eval-refactor branch February 4, 2024 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants