File: best_practices.md

package info (click to toggle)
surgescript 0.5.4.4-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,876 kB
  • sloc: ansic: 13,674; makefile: 16
file content (13 lines) | stat: -rw-r--r-- 766 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
Best Practices
==============

- Read the [Components](/tutorials/components) section. It's crucial that you understand it.
- Follow the golden rule: objects should **not** mess with each others' internals!
    - Objects should **not** change others' internal variables or states directly (not allowed!)
    - Objects should define [functions](/tutorials/functions) that can be operated upon by the external world (API)
- Use a consistent style, e.g.,
    - Use *camelCase* names for both variables and functions.
    - Use *4 spaces* when indenting your code.
- Combine related [packages](/tutorials/packages) into a single one: don't pollute the global namespace.
- Read the [SurgeScript documentation](/) often.
- **Practice, practice, practice! - and have fun!**