Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

PRQL contributor here:

That is a valid point and something I've also been thinking about lately. I can't speak for the others but in my case the Python string interpolation syntax was the one I was most familiar with, other than bash, so it was just the default. The big idea really is to have string interpolation and the syntax is somewhat secondary but we do aim for ergonomics with PRQL so it is a consideration.

Since then I've seen more alternatives like `Hello ${var}!` in JS/TS and $"Hello {var}!" in F#. Not sure that there's a clear way to prefer one approach over the others.

What would you consider to be factors that would make you prefer one over the others?



I suppose simplicity and familiarity would be the primary two goals. Then congruence with SQL would be another factor specifically for PRQL.


some factors:

ease of typing: so regular quotes are better vs backticks (even with a prefix), F-prefix - better than $, requiring Shift

ease of learning: here letter-mnemonic seems easiest: so I-prefix for "interpolation" or E-prefix for "expression" or maybe V-prefix for "variable". Or maybe F for "formatted" is also fine?

familiarity: so F-prefix due to Python?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: