bosatsu icon indicating copy to clipboard operation
bosatsu copied to clipboard

Strictness mode as declared in the file

Open johnynek opened this issue 5 years ago • 1 comments

One thing I’ve been thinking is how annoying it is in many languages to run with all warnings as failure while developing.

Since this setting is usually a compiler flag, it becomes a pain to selectively enable it.

We could instead be like Perl and have a use strict declaration at the top of a file if we want to be as strict as possible (no unused let bindings, for example).

This suggests a principle for bosatsu: semantics of what compiles is never controlled by compiler flags, only what is written in the source code.

What do you think @snoble ?

johnynek avatar May 11 '19 06:05 johnynek

This would be so good and feels like the right philosophy. You can tell if a file will work or not based entirely with what's in the file, with out having to worry about the environment (as much as possible). This seems consistent with how imports have to be explicit

snoble avatar May 11 '19 20:05 snoble