Comment

Comment by simonbyrne

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.

parent simonbyrne 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton