3 ms·
The basic syntax itself will look very familiar to someone coming from python. The immediate obvious differences: - 1-based indexing instead of 0-based - end
by simonbyrne 9y ago
The basic syntax itself will look very familiar to someone coming from python. The immediate obvious differences:
- 1-based indexing instead of 0-based
- end keyword vs significant whitespace blocks (and no colon to start a block)
- function instead of def (or defined inline f(x) = ...)
- x -> ... instead of lambda x : ...
- start:stop/start:step:stop instead range(start,stop)/range(start,stop,step)
- strings are joined with * instead of +
The actual internals, and features such as types and multiple dispatch can make it a very different to use, but hopefully that should be enough to get you started.
- kem 9y agoFWIW, I think now technically indexing can either be 1- or 0-based.