ndriscoll 5 minutes ago

> The compiler should understand the DSLs I’m writing and automatically map them to types it understands. If it needs more information—like a database schema—to figure that out, that information can be provided.

What you're describing are string interpolation macros, and e.g. Slick in Scala does this[0]. You write SQL with normal variable substitution, and it compiles to a prepared statement with bind values (so no SQL injection), and can optionally validate against your schema at compile time. Super simple to read, write, and maintain.

[0] https://scala-slick.org/doc/stable/sql.html

user68858788 43 minutes ago

The article is well written and shows why dynamic typing can be so compelling.

This is how I’ve been writing web services for the last decade. It was a style that came from being frustrated with the experience of using many all-in-one frameworks.

Frameworks take time to learn and the skills are generally non-transferable. Any complex application still requires you to know the underlying languages frameworks attempt to abstract. Frameworks often make testing more difficult due to adding layers of abstraction between what the application does and how the code is written.

Writing actual SQL/CSS/etc in a dynamically typed language to be used in a template is so much easier to understand, debug, and validate.

jannesan 3 hours ago

This is the first time I see a compelling argument for using dynamic languages for writing web backends. Not that I actually write web backends, so maybe this is all obvious to real practicioners. Thanks for sharing!