Drasil
Drasil copied to clipboard
What is our “naming” code style?
As the title suggests, what is our “naming” code style?
Right now we seem to have a mix of long/full and abbreviations used for name references. Should we prefer one way over the other? Can we make a hybrid with type aliases?
(the code style does touch upon this)
Which code? Our own Haskell code, or our generated code?
I think we should have a naming style for both our Haskell code and our generated code. For the generated code it would be great if we could change the naming conventions by selecting a different generator directive.
This ticket was primarily about our Haskell code, but I like @smiths' idea of extending it to the generated code too!
Regarding the Haskell code, we have makeX
, mkX
, aThingsFullName
, aThngsShrtNm
, aThingsShrtNm'
, and similar, so it would be nice to have a codestyle guideline. The apostrophes carry very little information, but sometimes we annotate with AThngsShrtNmWoutRefs
instead (better, in my opinion).
I agree that the apostrophes are bad. And that using both makeX
and mkX
is bad.
I am a big fan of short names for heavily used things. Normal functions should have reasonably descriptive names. But I find names in some ecosystems (Java comes to mind) ridiculously long. Certainly the package/module where something comes from shouldn't be repeated in a name.
I kind of feel like we should tackle this a little bit piecemeal for now. At least we should fix the glaring inconsistencies!
Sounds good, thank you. I'll break up this ticket this weekend into anything I can remember, but otherwise, we can just remember to clean things up as we go along, as I think you're suggesting.