>
> I almost hate myself for posting this, as format wars seem so pointless.
> But I'd love to use elm-format as gofmt has been awesome for me. Here
> goes:
>
{- comment -}
does not work. Same vertical spacing insertion.
{-| comment
-}
does work (comment remains adjacent to function body). I can live with the
latter. My gentle complaint however is that I'm not writing a reusable
library but an app and many/most of my functions are not meant to be called
externally. They are internal worker bees, yet I have to put documentation
comments on them, implying they are meant to be called externally.
It seems really aggressive/pointless to me that elm-format would change
vertical spacing on a one line "--" comment above a function. Next up. I
generally follow the Elm way in "let" blocks re "=" on vars/functions, but
sometimes I have code like:
let
tableHeight = tableWidth * tableAspectRatio
cardHeight = tableHeight * cardAspectRatio
cardWidth = tableWidth * cardAspectRatio
and elm-format blows these 3 lines into 9! Again, just feels overly
aggressive re spacing. Lastly, I have some "ifs" whose general structure
is:
if a && b ||
c && d ||
e then
and elm-format is doing this:
if
rslt.suit
< 0
|| card.suit
== rslt.suit
&& card.rank
< rslt.rank
|| card.suit
/= rslt.suit
&& card.suit
== trumpSuit
then
Yuck. Now I can work around this by creating local vars for each clause,
but then I run into the previous issue.
It's great that elm-format is "inspired by gofmt". They are very different
languages obviously. But all 3 of my cases are just normal code
reformatting choices, nothing germaine to Elm vs Go, so not sure why the
wheel needs re-inventing.
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.