Moving towards dialogue

Collaborating with your computer using typed holes!

Vaibhav Sagar (@vbhvsgr)

What’s a typed hole?

Typed holes

A placeholder for an expression with a known type and an unknown value.


They allow the programming language to help us write programs!

Why do holes need to be typed?

Let’s write a program in Python

Is this program correct?

What about this one?

This one?

How do I write programs that work?

We need tests!

Tests are not sufficient

The language does not understand tests

The language can understand types


Statically typed!

Type inference!

Typed holes!


More sophisticated type system!

Weaker type inference :(

Better editor integration!

Fancier typed holes!

We did it!

Typed holes exist!!!

Types are friends, not food!

Programming can be fun and interesting!


Thank You

Untyped Holes: Program Sketching!

1. Write a program with gaps (a ‘sketch’)

2. Write some test cases

3. Give a SAT/SMT solver your sketch and test cases

4. ???

5. Profit!

Still a research topic for now :’(