Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StrictData language extension #243

Closed
ezoerner opened this issue Jun 20, 2022 · 1 comment
Closed

StrictData language extension #243

ezoerner opened this issue Jun 20, 2022 · 1 comment

Comments

@ezoerner
Copy link

The README states

Make data fields strict by default, unless you have a good reason to do otherwise.

but I don't see the StrictData language pragma in the recommended list. Is this an oversight?

@snoyberg
Copy link
Collaborator

I personally don't recommend it because it's a non-local change inverting the meaning of code. Looking at data Foo = Foo { bar: Int } I no longer know if bar is strict or lazy. I think StrictData is a better default, but prefer explicitness in the code. (Not everyone agrees with me on this of course.)

@ezoerner ezoerner closed this as completed Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants