Add naming conventions to docs
This commit is contained in:
+25
-1
@@ -7,7 +7,8 @@ tested and validated findings, for continued reference by me.
|
|||||||
## Compiler
|
## Compiler
|
||||||
|
|
||||||
Odin's compiler is demand-driver: a procedure's body is only semantically
|
Odin's compiler is demand-driver: a procedure's body is only semantically
|
||||||
analyzed when the proc is actually referenced.
|
analyzed when the proc is actually referenced. They are syntactically checked
|
||||||
|
always.
|
||||||
|
|
||||||
## Dynamic Library Memory
|
## Dynamic Library Memory
|
||||||
|
|
||||||
@@ -67,3 +68,26 @@ Sindri Engine:
|
|||||||
- Event
|
- Event
|
||||||
- Keycodes
|
- Keycodes
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Logging strategy
|
||||||
|
|
||||||
|
From the docs:
|
||||||
|
|
||||||
|
> While it is ok for simple apps to use the core:fmt package, libraries and
|
||||||
|
> complex apps should prefer the core:log package. By using the implicit logger
|
||||||
|
> library and application authors allow the caller to decide how to process log
|
||||||
|
> messages.
|
||||||
|
|
||||||
|
## Naming Conventions
|
||||||
|
|
||||||
|
From core.odin:
|
||||||
|
|
||||||
|
> In general, Ada_Case for types and snake_case for values
|
||||||
|
>
|
||||||
|
> - Package Name: snake_case (but prefer single word)
|
||||||
|
> - Import Name: snake_case (but prefer single word)
|
||||||
|
> - Types: Ada_Case
|
||||||
|
> - Enum Values: Ada_Case
|
||||||
|
> - Procedures: snake_case
|
||||||
|
> - Local Variables: snake_case
|
||||||
|
> - Constant Variables: SCREAMING_SNAKE_CASE
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
package game
|
package game
|
||||||
|
|
||||||
import "core:time"
|
|
||||||
import "core:fmt"
|
import "core:fmt"
|
||||||
|
import "core:time"
|
||||||
|
|
||||||
import "sindri:base"
|
import "sindri:base"
|
||||||
import "sindri:core"
|
import "sindri:core"
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ VERSION :: #config(VERSION, "dev")
|
|||||||
// -----------------------------------------
|
// -----------------------------------------
|
||||||
|
|
||||||
main :: proc() {
|
main :: proc() {
|
||||||
fmt.println("hello world!")
|
fmt.println("hello world!", VERSION)
|
||||||
|
|
||||||
// Hot reload development functionality
|
// Hot reload development functionality
|
||||||
hr, err := base.hot_reload_init()
|
hr, err := base.hot_reload_init()
|
||||||
|
|||||||
Reference in New Issue
Block a user