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

Fix some (innocuous) dynamic dispatches #1058

Merged
merged 1 commit into from
Jul 14, 2024
Merged

Fix some (innocuous) dynamic dispatches #1058

merged 1 commit into from
Jul 14, 2024

Conversation

Tortar
Copy link
Member

@Tortar Tortar commented Jul 14, 2024

These changes make JET a bit happier about the package

@Tortar Tortar marked this pull request as ready for review July 14, 2024 21:46
@Datseris
Copy link
Member

What's lazy""?

@Tortar
Copy link
Member Author

Tortar commented Jul 14, 2024

help?> lazy""
  lazy"str"

  Create a LazyString using regular string interpolation syntax. Note that interpolations are
  evaluated at LazyString construction time, but printing is delayed until the first access to the
  string.

  See LazyString documentation for the safety properties for concurrent programs.

  Examples
  ≡≡≡≡≡≡≡≡

  julia> n = 5; str = lazy"n is $n"
  "n is 5"
  
  julia> typeof(str)
  LazyString

  │ Julia 1.8
  │
  │  lazy"str" requires Julia 1.8 or later.

this can be used to remove dynamic dispatch when interpolating variables in errors, I learnt the trick from Base Julia

@Datseris Datseris merged commit f01615d into main Jul 14, 2024
6 checks passed
@Datseris Datseris deleted the k branch July 14, 2024 22:14
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.

2 participants