Skip to content

print() and print_when() could be more ergonomic to use #8176

Description

@steven-johnson

These are great and essential tools for debugging, but they could be a lot better:

  • They are painful to conditionally insert into the code because the syntax is very intrusive
  • Turning them on and off requires recompiles

Thought: what if we added a scheduling directive for print_when() that would inject the print when the func is evaluated? (No need for print() since that's just print_when(true))? And added some optional controls via env var (eg print_when_env("ENV_VAR_NAME")?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions