elm-format ain't deterministic for the same code with different (but valid) indentations 😭
Conversation
Why is this a bad thing? I've actually been frustrated with rustfmt for not taking into account my formatting! 😅
1
because I'm compiling svg to elm-based svg and I get a one-liner that I have to massage manually first otherwise I get an error
1
2
also, I believe those formatting tools are supposed to keep everybody's code under the same rules?
1
1
Replying to
I think what I've liked is that sometimes it looks nicer to put things on one line or over multiple lines. It's nice when it takes the programmers choice into account when formatting rather than disregarding it. But I can see how that's not so great for formatting generated code.
There was an interesting post that went through of the design choices for the Ormolu Haskell formatter: tweag.io/posts/2019-05- - might explain the design choices a bit more clearly.
1
1
(it seemed quite similar to elm-format's philosophy, but more precisely expressed)
1
Show replies

