Hacker News new | past | comments | ask | show | jobs | submit login

This would break backwardcompatibility pretty hard. In many cases it may not be worth it.



Javascript already has prior art here.

A library can extend an existing database library like 'pg' so that PgClient#query() and PgPool#query() require string template statements.

That way 'pg' can continue working with strings, and people who want nice templated strings can use the small extension library, and the small extension library makes it impossible to accidentally pass strings into the query functions.


But now at least the language has the necessary rope (and an opportunity for a cultural push to insist on it.)




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: