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

Support synchronously printing special map types #3187

Closed
danobi opened this issue May 18, 2024 · 1 comment
Closed

Support synchronously printing special map types #3187

danobi opened this issue May 18, 2024 · 1 comment
Labels
enhancement New feature or request, changes on existing features power-user

Comments

@danobi
Copy link
Member

danobi commented May 18, 2024

Is your feature request related to a problem? Please describe.

It would be nice to be able to do:

BEGIN { @ = count(); printf("val: %d\n", count()) }

As a workaround, users can currently asynchronously do:

BEGIN { @ = count(); print(("val", @)) }

Describe the solution you'd like

Now that we can loop over map elements, we can codegen direct accesses to count() (and possibly others) and generate a value in-kernel. This makes the special map types a bit more usable.

Describe alternative solutions or features you've considered

Allow async printf(). But that breaks some existing contracts in docs.

@danobi danobi added enhancement New feature or request, changes on existing features power-user labels May 18, 2024
@danobi
Copy link
Member Author

danobi commented May 18, 2024

Dup of #3126

@danobi danobi closed this as not planned Won't fix, can't repro, duplicate, stale May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request, changes on existing features power-user
Projects
None yet
Development

No branches or pull requests

1 participant