~/talk

GHC String interpolation

links:none on file
slides:none on file

A GHC proposal (opened in 2023) adds native string interpolation with an S"..." syntax that desugars to an interpolate class and builder-style combinators; a local build compiles and demos show ${expr} inlines (including nested expressions), a SQL-qualified interpolator that parameterizes values to prevent injection, and a source-loc interpolator. Benchmarks show plain String interpolation matches naive concatenation while Text is 13× slower unless using qualified strings plus rewrite rules to regain naïve performance. The design evolves after 3 years and 635 comments.

AI-written summary · about

  1. 0:00GHC string interpolation intro
  2. 1:30String interpolation need
  3. 2:35Live demo
  4. 6:47Interpolate type class
  5. 9:13Desugaring and performance
  6. 13:45Feature status and limits
  7. 14:45Qualified strings extension
  8. 16:51Interpolate empty necessity
  9. 19:16Custom interpolators
  10. 21:24Benchmark results
  11. 24:54Three-year proposal reflections
  12. 29:05Community feedback debates
  13. 30:09GitHub discussions challenges
  14. 35:10Open discussion and audience questions
  15. 45:21Closing thoughts
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.