-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Case convention for the standard library #88
Comments
I think we should consider this a non-concern. Builtins do not need to prime syntactic real estate. Zig prefixes them with |
Naming conventions, some common, some I just made up for this post, so we have a language with which to talk about these options.
Thoughts:
|
One category that I forgot about in my initial list: module names. We currently use snake_case for modules, but this runs the risk of name clashes (especially for constructions like |
I suspect it will be rare for the standard library to export modules, so the naming convention here shouldn't matter too much. That being said, I'd like to aim for the standard library to be readable just like "normal code" and so it's possible that whatever conventions we choose will be copied. In my mind the bigger concern is that modules will be spelled frequently and should therefore be unobtrusive. If we make them annoying to spell (e.g., something horrible like RoLlErCoAsTeRcAsE, users will opt for embedding the module with |
Right now the code in stdlib/ contains a mishmash of styles, with UpperCamelCase and snake_case most predominant. We should decide on a common case convention for:
~`T
)I don't have a concrete proposal yet, but here are some miscellaneous thoughts on the topic:
for
,if
,while
, etc.) On the other hand, the scopes in file.ic are upper-cased (With
andLines
) because they're not mimicking anything in particular.atoi
,double
,isdigit
, etc.)Finally: whatever convention we decide to follow for stdlib code is very likely to become the convention for all Icarus code. We should do our best to make it readable, convenient to use, and easy to remember.
The text was updated successfully, but these errors were encountered: