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

Improve compiled code #2

Open
gjmcn opened this issue Apr 9, 2020 · 0 comments
Open

Improve compiled code #2

gjmcn opened this issue Apr 9, 2020 · 0 comments
Labels
compiler Zap compiler

Comments

@gjmcn
Copy link
Owner

gjmcn commented Apr 9, 2020

The code for the Zap operators used in a file is included in the file — either inline or as a method of the local _z_ object. There are various problems with this approach and its implementation:

  • Some operators require a significant amount of code, so potentially repeating the code in multiple files is bad.

  • The code for _z_ methods is not source mapped. If a _z_ method throws, the error is reported as originating from the first line. The true source of the error from the user's perspective (i.e. where the _z_ method was called from) is further down the call stack.

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

No branches or pull requests

1 participant