News for hackers. Stuff that matters.
Re:The Reason Java Is Still Popular by __ryan__ on Thursday September 22, 2022 @02:50PM (#32943047)
You are thinking of string interpolation. The idea behind string templates, the feature the example is showcasing, is effectively a way to define a function that can be called with similar syntax to string interpolation.

So DB."SELECT * FROM Person p WHERE p.last_name = \{name}" would basically be a function call like DB("SELECT * FROM Person p WHERE p.last_name = ", name), which would do the right thing to parameterize the SQL.

There are no comments on this comment yet.