Page 1 of 1
CamelCase
Posted: Mon Dec 02, 2024 12:21 pm
by BraveCaperCat
Why do the developers use snake_case (or snake-case when not using lua) and not CamelCase? They should always be consistent but... why did you pick one over the other? They seem to be just as good and error_free and ErrorFree.
Re: CamelCase
Posted: Wed Dec 04, 2024 1:58 am
by DaveMcW
I suspect it's because the C++ code is written in CamelCase (see the internal class names
here), and they want an easy way to keep the lua functions distinct.
Re: CamelCase
Posted: Wed Dec 04, 2024 8:19 pm
by BraveCaperCat
DaveMcW wrote: ↑Wed Dec 04, 2024 1:58 am
I suspect it's because the C++ code is written in CamelCase (see the internal class names
here), and they want an easy way to keep the lua functions distinct.
Ah. I don't use the control scripting side of factorio modding very much (more of a prototype person) so it now makes sense why they would use CamelCase and snake_case in the C++ and lua code respectively.