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

A common software engineering practice whenever one runs into a bug in production is to say "How can I make sure this class of bugs results in a test failure in the future?"

With a good type system, you can take that thought one step further and say, "How can I make sure this class of bugs results in a compilation failure in the future?"

Rogue lets us do that. The DSL is both expressive (it covers almost all of Mongo's query features) and easy to use (Rogue queries are concise and very similar to Mongo queries), yet they eliminate (at compile time!) a whole class of bugs that have bitten us in the past. When your Rogue query compiles, you can be fairly certain that it will generate a well-formed Mongo query. Getting a similar guarantee from a test suite would involve a lot more work.




Jorge - rogue looks great, and had it existed when I started my current project I might well have picked scala rather than clojure and congomongo (which is great too).

However - when you say it would have involved more work to guarantee well formed queries from a test suite, I find myself wondering how that can be true if you test every function that hits the database. Wouldn't malformed queries would cause such tests to fail?


Ariane 5 Flight 501.

In practical terms, better testing would've saved it, not better type safety.

The rest of the sales pitch doesn't require type safety, although I appreciate that a rather nice piece of software is being shared here.

Type safety obsession reeks of cargo cult to me, but that's not exclusive with well-made software.




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

Search: