You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BREAKING CHANGE -- Till the first release, it's most likely to change everything with compatibility breaks.
Discuession
Currently, pocketlang doesn't have any naming convention, and every symbol is snake_case. We need to enforce a naming convention for consistency across the builtin functions and core modules. And I'd like it to match our C implementation.
Function names are camelCase
Variable names/attributes are snake_case
Class names are PascalCase
Modules intended to used as a collection of functions (ex math, path) - snake_case
Modules intended to used as a type wrapper (ex File, Fiber) - PascalCalse
How to rename
You can find all the builtin functions, core module and its functions at src/pk_core.cHere (ex: to_string -> toString)
The additional cli modules at cli/modules.c
Finally
This requires you to rename all the test suites in tests/ directory for the tests to be passed
Check docs at docs/pages/Getting-Started/learn-in-15-minutes.md if any functions need renaming.
If you have any suggestions, regarding the renaming let me know.
The text was updated successfully, but these errors were encountered:
BREAKING CHANGE -- Till the first release, it's most likely to change everything with compatibility breaks.
Discuession
Currently, pocketlang doesn't have any naming convention, and every symbol is
snake_case
. We need to enforce a naming convention for consistency across the builtin functions and core modules. And I'd like it to match our C implementation.Function names are
camelCase
Variable names/attributes are
snake_case
Class names are
PascalCase
Modules intended to used as a collection of functions (ex
math, path
) -snake_case
Modules intended to used as a type wrapper (ex
File
,Fiber
) -PascalCalse
How to rename
You can find all the builtin functions, core module and its functions at
src/pk_core.c
Here (ex:to_string
->toString
)The additional cli modules at
cli/modules.c
Finally
tests/
directory for the tests to be passeddocs/pages/Getting-Started/learn-in-15-minutes.md
if any functions need renaming.If you have any suggestions, regarding the renaming let me know.
The text was updated successfully, but these errors were encountered: