# GHC String Interpolation - Final Survey

**URL:** <https://discourse.haskell.org/t/ghc-string-interpolation-final-survey/11895>\
**Category:** Announcements\
**Created:** [April 22, 2025, 5:50am UTC](https://discourse.haskell.org/t/ghc-string-interpolation-final-survey/11895 "2025-04-22T05:50:54Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![dschrempf](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/dschrempf/32/1933_2.png) [@dschrempf](https://discourse.haskell.org/u/dschrempf)\
**Post date:** [April 25, 2025, 5:44am UTC](https://discourse.haskell.org/t/ghc-string-interpolation-final-survey/11895/22 "2025-04-25T05:44:44Z")

</div>

Yes, that’s what I mean. Is it not possible to directly construct a `Text` value? If not, does this affect runtime?

---

<div class="post-metadata">

**Author:** ![hasufell](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/hasufell/32/1250_2.png) [@hasufell](https://discourse.haskell.org/u/hasufell)\
**Post date:** [April 25, 2025, 5:57am UTC](https://discourse.haskell.org/t/ghc-string-interpolation-final-survey/11895/23 "2025-04-25T05:57:20Z")

</div>

> [@brandonchinn178](#):
>
> so that all of the proposals will work with Text and ByteString

correction: silently truncated bytestring (Char8). So unicode doesn’t work.

---

<div class="post-metadata">

**Author:** ![brandonchinn178](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/brandonchinn178/32/5103_2.png) [@brandonchinn178](https://discourse.haskell.org/u/brandonchinn178)\
**Post date:** [April 25, 2025, 6:07am UTC](https://discourse.haskell.org/t/ghc-string-interpolation-final-survey/11895/24 "2025-04-25T06:07:09Z")

</div>

Let me say it like this: `s"a ${x} b" :: Text` will have the same runtime performance as `"a " <> x <> " b" :: Text` (where `x :: Text`), for all of the options. Does that answer your question?

@hasufell ah sure, yes. Interpolated strings will inherit the same limitations as overloaded strings.

---

<div class="post-metadata">

**Author:** ![Kleidukos](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/kleidukos/32/1213_2.png) [@Kleidukos](https://discourse.haskell.org/u/Kleidukos)\
**Post date:** [April 25, 2025, 6:16pm UTC](https://discourse.haskell.org/t/ghc-string-interpolation-final-survey/11895/25 "2025-04-25T18:16:32Z")

</div>

The typeclass mechanisms relies on user-visible internals, right? Maybe I’m misunderstanding (and please do let me know if I’m wrong), but wouldn’t there be a pressure to keep this typeclass stable/immutable because implementation details have leaked into the end-users’ programs?

---

<div class="post-metadata">

**Author:** ![brandonchinn178](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/brandonchinn178/32/5103_2.png) [@brandonchinn178](https://discourse.haskell.org/u/brandonchinn178)\
**Post date:** [April 26, 2025, 4:22pm UTC](https://discourse.haskell.org/t/ghc-string-interpolation-final-survey/11895/26 "2025-04-26T16:22:24Z")

</div>

Ah yes, you’re right. Any option that lets users specify how to interpolate their values has implementation visible to the user. That is, all of them, except explicit.

I don’t think there’s a way around it. Although we could mark the extension as experimental and change it in future versions

[Previous page](https://discourse.haskell.org/t/ghc-string-interpolation-final-survey/11895.md?page=1)
