簡介
讓我們開始吧!
HTTP 伺服器
命令列應用程式
The shards command
使用編譯器
語法及語意
註解
常值 (Literals)
空值 (Nil)
布林值 (Bool)
整數 (Integers)
浮點數 (Floats)
字元 (Char)
字串 (String)
符號 (Symbol)
陣列 (Array)
雜湊 (Hash)
範圍 (Range)
正規表示式 (Regex)
序組 (Tuple)
命名序組 (NamedTuple)
程序 (Proc)
賦值
區域變數
Control expressions
Truthy and falsey values
if
As a suffix
As an expression
Ternary if
if var
if var.is_a?(...)
if var.responds_to?(...)
if var.nil?
if !
unless
case
while
break
next
until
&&
||
引入檔案
Types and methods
Everything is an object
The Program
Classes and methods
new, initialize and allocate
Methods and instance variables
型別推導
Union types
Overloading
Default values and named arguments
Splats and tuples
Type restrictions
Return types
Method arguments
Operators
Visibility
Inheritance
Virtual and abstract types
Class methods
Class variables
finalize
Modules
Generics
Structs
Constants
Enums
Blocks and Procs
Capturing blocks
Proc literal
Block forwarding
Closures
alias
Exception handling
型別語法
Type reflection
is_a?
nil?
responds_to?
as
as?
typeof
Macros
Macro methods
Hooks
Fresh variables
Annotations
Built-in annotations
Low-level primitives
pointerof
sizeof
instance_sizeof
offsetof
Uninitialized variable declaration
Compile-time flags
Cross-compilation
C bindings
lib
fun
out
to_unsafe
struct
union
enum
Variables
Constants
type
alias
Callbacks
Unsafe code
使用慣例
Coding style
撰寫文件
Database
Connection
Connection pool
Transactions
Guides
Performance
Concurrency
Testing
Writing Shards
Hosting on GitHub
Hosting on GitLab
Continuous Integration
Using Travis CI
Using CircleCI
Published with GitBook
使用慣例
使用慣例
遵循這些慣例,能夠讓我們的程式碼更容易地被其他的開發者所了解。
閱讀並使用
標準 Coding Style
讓我們的專案能夠有更高的可讀性和可導航性
撰寫文件
來表達我們程式的目的並且讓
crystal docs
能夠自動產出文件
results matching "
"
No results matching "
"