Julia
Julia Documentation
Julia packages
Open source packege community:
Julia Packege Develpment
- Using PkgTemplates to Genarate a julia project.
source: PkgTemplates.jl
- Using LcaolRegistry.
source: LcaolRegistry.jl
To update package for new version, the command follows could be run
using LocalRegistry
register(package)
Other useful packges
- Documenter, source: Documenter.jl
- Plots, source: Plots.jl
- HDF5, source: HDF5.jl
Julia characters
Dictionary
Initial a dictionary
output = Dict{String, Any}()
Write and load
output["Para/Ma"] = Ma
Ma = output["Para/Ma"]
Functions
keys(output), haskey(output, "Para/Ma")
元编程
宏
宏提供了一种机制,可以将生成的代码包含在程序的最终主体中。 宏将一组参数映射到返回的 表达式,并且生成的表达式被直接编译,而不需要运行时 eval
调用。 ==宏参数可能包括表达式、字面量和符号。==
julia 有趣的特性:
- 元编程,对于宏的定义和调用
- 多重派发
- 面向对象
Notations
kwarg...
好用,但是要少用,因为这里隐含着潜在的歧义