Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Swift Functions and Optionals Functions Syntax and Parameters

Blaine Fallis
Blaine Fallis
2,449 Points

string interpolation was hard at first but I read about it at developer.apple. made more sense. Is it unique to Swift?

Amit sort of dove right in with it in Swift Basic, but I hadn't seen that syntax in other languages.

the iOS developer library has a good explanation of it:

"You can also use strings to insert constants, variables, literals, and expressions into longer strings, in a process known as string interpolation. This makes it easy to create custom string values for display, storage, and printing."

I get the feeling it's a very important aspect of swift?

1 Answer

Jason Wayne
Jason Wayne
11,688 Points

No. String interpolation is a concept used in almost all languages (ruby, objective-c and etc..) . The only difference is as you pointed out the syntax.