Skip to content

Comment on Idris - pure functional programming language with dependent typesparent

Comments

I haven't read the tutorial at all, but in dependently typed languages the type (Fin N) is exactly the type of "natural numbers under N", and I expect that is what Edwin is using in the tutorial.

As for compiling to that pointer access: from what I know of Idris, yes it will. Since you know statically that the array access cannot be out of bounds, you can omit the usual out-of-bounds checks.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.