-
Notifications
You must be signed in to change notification settings - Fork 1
Terminology and best practices
xzores edited this page Nov 11, 2023
·
1 revision
We try to provide a consistent terminology in the furbs library, there following rules applied:
-
init_*
implies adestroy_*
and if ´init_*´ is called so mustdestroy_*
before termination. Init implies and allocation and/or setup code. -
make_*
implies adelete_*
and if ´make_*´ is called so mustdelete_*
before termination. Make only implies a allocation. -
load_*
implies aunload_*
and if ´load_*´ is called so mustunload_*
before termination. Implies something allocation and/or setup code and loading/unloading a resource, like a file or Opengl uniform. - ´setup_*´ does no allocate and does not require any further calls. Think of it as a helper that setups the struct a valid/normal state.
We follow the Odin naming convention and all libraries start with a small letter.
Vectors are passed as [x]f32 where x is the number of dimensions. you might see a loc := #caller_location at the end of many functions, these are you to give error messages about where you made a mistake and can be overwritten by passing another source code location.
We keep almost everything transparent, so in the case you want to bypass something you are likely able to.