Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

snake case convention is the only thing that always feels odd to me.

Perhaps its because I deal in TypeScript all day, every day, but it never stuck with me.

That said, small price to pay for a very nice runtime!



I come from js/ts as well and I find snake case much more readable than camel after using it in other languages for a bit. There are even js/ts projects that use snake case despite the camel case convention, for readability

https://github.com/sveltejs/svelte/issues/3479#issuecomment-...


Yeah, CamelCase for modules, snake_case for functions and variables.

Your brain can instantly tell what entity you’re dealing with.


I come from a background where everything is camelCase. Naturally I wrote my JSON this way as well, among other things.

Switching to snake_case was challenging at first - I kept writing things in camelCase. Now, I've become pretty fond of snake_case and have a tough time going back into environments that require camelCase - funny thing, that is.

Thankfully Gleam's build tool/language server has a fairly strongly opinionated formatter built in, so it will let you know pretty quickly and help you fix it.


One thing I disliked is black, the Python formatter, with its utterly naive rules, that treat all code the same. It required me to workaround in many places, like always using a trailing comma for any list or tuple, to keep the items on separate lines, instead of black fumbling around and putting them on the same line. It was utterly annoying. This made me very vary of "opinionated" (read: inflexible unconfigurable pieces of software) formatters. Hopefully Gleam's formatter isn't as stupid as black is.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: