SIP-24: Simplified simple form interpolation

Skip to first unread message

Som Snytt

Jul 8, 2014, 4:28:32 PM7/8/14
Here is a freshening of SIP-24.  It features simplified simple form interpolation: any Scala identifier is OK, and $" is taken for literal quote.

I edited the language and the examples.  In particular, I used the Bob example from SIP-11.  Since "big_bob" makes an appearance in SLS 1.1, I'm pretty sure Bob is significant in some way.

The gist is that arbitrary identifiers are accepted for "simple form" or braceless interpolation, including backquoted identifiers.

The fact that identifiers with dollars must be backquoted is mentioned in the commit message but not yet in the SIP document.

The implementation is at

I just noticed it incorrectly excludes s"$_foo".  Off the top of my head, I don't know whether it's better to require s"$`_`foo" or s"$`_foo`"; probably the first.

Also, scanning for ids uses nextChar instead of nextRawChar, which differs in newline handling, but I haven't experimented yet.  I'm just on lunch break (at the home office, watching company videos, for the record.  I just needed a relaxing coding break.)

Kevin Wright

Jul 8, 2014, 6:16:52 PM7/8/14

Can I now mention that I have an SIP on my resumé?  Perhaps I should look into getting a laptop sticker printed...

Som Snytt

Jul 11, 2014, 3:07:32 AM7/11/14
I'd forgotten that interpolator ids had been upgraded already:

I thought it was less a bug than a gnat, but Adriaan opined on the PR that it was "(less gnatty to me)", as it surely was.  And unsipped!

You received this message because you are subscribed to the Google Groups "scala-sips" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit

Reply all
Reply to author
0 new messages