Remix.run Logo
pmontra an hour ago

Why do many people mention the need of tests for types in dynamically typed languages?

In Rails my tests are mostly to ensure that a request to a controller returns the expected response and the expected changes in the database. Unit tests are often on validations and the errors they return for invalid data. Then there are functional tests that drive a headless browser.

pjmlp 33 minutes ago | parent [-]

Because they are a requirement to avoid runtime errors that usually are compilation errors in other languages.

Not fun in production.

Dynamic languages with optional typing like BASIC or Common Lisp is another matter.