I am pretty firmly on the pro-static-types camp (Haskell, Ocaml, F#, etc) and what wasn’t directly addressed by either person was types as a tool to usefully restrain developers and keep them honest.
In particular I have had multiple experiences in trying to refactor, clean up, change some code in a dynamically typed language and just having no idea what anything is, which makes it very hard to safely make changes. In a statically typed language the types might be terrible but at least they are clear and enforced. Bracha talked a bit about types-as-documentation, but I don’t see that as useful unless the types are enforced.
In general, I think these discussions are pretty hard because both sides usually like solving problems in whatever model they are promoting and don’t see the other side’s issues as issues. This talk was not so bad in that both sides have had experience across both paradigms.
I do think Felleisen delivered a bit of a death blow when he brought up Rust using the type system to ensure race conditions cannot happen. A strong use of the type system that ensures correctness of a program for which no equivalent exists for dynamically typed languges.
For a graduate class, I decided to write a small static analysis framework for Python. Because Python already has a Python parsing library available, I decided to use that. I found myself often chasing bugs that would’ve been caught in a type system like OCaml’s (my language of choice); None appearing where I wasn’t expecting them, messing up the order of elements in a tuple, using a generator for something that was traversed multiple times or indexed, etc. I got the whole project working, but I was very wary of how brittle it felt. At many points I considered just switching to OCaml, but writing a lexer+parser for Python would’ve just been too much work for a school project.
STOP'15 Workshop Panel: “Types for an Untyped World”.
A discussion between Gilad Bracha and Matthias Felleisen at the STOP workshop, co-located with ECOOP in Prague.
I am pretty firmly on the pro-static-types camp (Haskell, Ocaml, F#, etc) and what wasn’t directly addressed by either person was types as a tool to usefully restrain developers and keep them honest.
In particular I have had multiple experiences in trying to refactor, clean up, change some code in a dynamically typed language and just having no idea what anything is, which makes it very hard to safely make changes. In a statically typed language the types might be terrible but at least they are clear and enforced. Bracha talked a bit about types-as-documentation, but I don’t see that as useful unless the types are enforced.
In general, I think these discussions are pretty hard because both sides usually like solving problems in whatever model they are promoting and don’t see the other side’s issues as issues. This talk was not so bad in that both sides have had experience across both paradigms.
I do think Felleisen delivered a bit of a death blow when he brought up Rust using the type system to ensure race conditions cannot happen. A strong use of the type system that ensures correctness of a program for which no equivalent exists for dynamically typed languges.
For a graduate class, I decided to write a small static analysis framework for Python. Because Python already has a Python parsing library available, I decided to use that. I found myself often chasing bugs that would’ve been caught in a type system like OCaml’s (my language of choice); None appearing where I wasn’t expecting them, messing up the order of elements in a tuple, using a generator for something that was traversed multiple times or indexed, etc. I got the whole project working, but I was very wary of how brittle it felt. At many points I considered just switching to OCaml, but writing a lexer+parser for Python would’ve just been too much work for a school project.
In such situation, I would have a Python parser written in Python that dumps to, say, JSON, and write the rest in OCaml.
STOP'15 Workshop Panel: “Types for an Untyped World”. A discussion between Gilad Bracha and Matthias Felleisen at the STOP workshop, co-located with ECOOP in Prague.