Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I’m struggling to understand the use, do you have a concrete example?


Brady has a presentation about Idris where he shows Type-Driven development (where you write code that could typecheck with some holes and you get the compiler to help you figure out the missing types for your "whatever/something" untyped variables)

https://youtu.be/X36ye-1x_HQ?t=5m15s


This is awesome, but I find that syntax so hard to follow, but that's just me being unfamiliar with it I guess.


It happens, but all syntax families eventually become familiar, even on LISP you eventually stop worrying about the parentheses as you learn how to grok the code.


Suppose you declare some:

const transformFoo: (foos: Foo[]) => Bar

and you start implementing it and get stuck with some callback or whatever you can put a `hole` and it will tell you the type signature of what you're missing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: