Menu
Sign In Search Podcasts Libraries Charts People & Topics Add Podcast API Blog Pricing

Simon Peyton Jones

πŸ‘€ Speaker
962 total appearances

Appearances Over Time

Podcast Appearances

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

But I want them to do that in a provably secure way.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

So you can know that these programs don't interact rather than just say, I've done my best.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

Oh, well, it can be very tiresome and inconvenient, right?

565.63 View full episode β†’
The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

So you're somewhere deep in the, you know, a subroutine of a subroutine of a subroutine of a software stack, and you want to reach out and, I don't know, grab the time of day.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

Oh, dear.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

That's a side effect.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

But we're in a pure functional language.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

And indeed, there's a good reason because everybody else in Ohio in the stack is assuming that if I call this function apply to seven, it will give me the same answer if I call it again apply to seven.

584.56 View full episode β†’
The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

But if it could interrogate the time of day, suddenly it might give a different answer.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

Right.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

So this as simple a thing as I was asking for the time of day invalidates a whole set of assumptions.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

And so it's not by default allowed at all.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

And that can be inconvenient because all you say, look, guys, all I want to do is get hold of the time of day.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

Don't give me grief.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

And so every functional programming language, including Haskell, provides you with a little trapdoor.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

Haskell's is called unsafe perform I.O.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

And it says, trust me, I'm going to do something that has side effects, but you can pretend there weren't any.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

All right.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

So, and it's called, it is literally spelt U-N-S-A-F-E perform IO, the long name that has unsafe in the title so that you, the programmer, are taking on the obligation to make sure that what you're doing is okay.

634.38 View full episode β†’
The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

Whereas in imperative language, everything you do could be unsafe perform IO-ish.