6 ms·
Odin itself does not care what naming conventions you use. Use whatever you prefer. For Odin native libraries, we usually for the convention of `snake_case` fo
by gingerBill 1y ago
Odin itself does not care what naming conventions you use. Use whatever you prefer.
For Odin native libraries, we usually for the convention of `snake_case` for variables and procedures and `Ada_Case` for types. However for anything that is third-party/foreign, we try to keep to the same convention as the original library to make it easier to people reference the original documentation, as well as not have any of the problems that certain naming conventions cannot be translated to another. So the raylib code uses the original raylib naming conventions because of the reasons I described.
- bvrmn 1y agoSticking to an library style is a way to go. It's so much friction to use python library wrappers which try to hammer original style into a snake_case.
- beagle3 1y agoNim has solved this in a very practical way, which works great - case insensitive except 1st letter, and underscore insensitive. So hello_world and helloWorld and hello___wOrlD are the same identifier, though HelloWorld and hello_world are not. Many people complain that this is horrible, but not people who have actually tried it. It works very well, lets you bridge over differences in C++ library conventions, Unix C conventions and Microsoft conventions in a project that interfaces all of them, without getting users upset. (There’s more to it - consistency for some identifier can be enforced, there’s a smart source reformatted, and more)