Category Archives: Lecture Log

Lecture 17: Traits and References in Rust

Title slideToday’s lecture presented the core of Rust’s claim to provide safe systems programming: the use of move semantics, reference ownership and borrowing to provide precise and powerful memory-safe programming without runtime overhead. The features that provide this form a detailed deconstruction of what in other languages would be objects, but in Rust are carefully prised apart, each treated separately for their individual contribution. I also included a number of pictures of food to illustrate this.

Continue reading Lecture 17: Traits and References in Rust

Guest Lecture: Andrew Kennedy

The Hack Programming Language:
Types for PHP

Andrew Kennedy

3–4pm Friday 18 November
Gaddum Lecture Theatre G.8
1 George Square

Facebook’s main website, ads platform, and much of its internal tooling is implemented in PHP, a language not known for elegance or best practice in programming language design. (See http://phpsadness.com, for example.) Over the last three years Facebook has embarked on an ambitious project to migrate its code base to Hack, which takes the syntax of PHP, removes the worst features, and adds static typing and modern constructs for asynchronous programming and typed UI components. In this talk I will focus on Hack’s type system, which combines ML-like type inference, object-oriented generics in the style of C# or Java, and flow-based typing of local variables.

Speaker

Andrew Kennedy is a software engineer at Facebook London working on the Hack team. Before joining Facebook in January this year he spent 16 years at Microsoft Research, during which time he helped design and implement the generics feature for the .NET Common Language Runtime and polymorphic units-of-measure inference for the F# programming language, in addition to making many research contributions in type systems, semantics, formal verification and compilation.

Lecture 15: The Rust Programming Language

Title slideThis final APL topic addresses programming for memory safety, and in particular the techniques used in the Rust language. Rust is a fairly recent language, designed for “safe systems programming”: providing low-level precise control for programmers, minimal execution overheads, and promises about correct use of memory and threads. In this short introductory lecture I covered the basics of Rust, and gave a few small indications of how its C-like appearance masks a quite substantial effort to do things differently.
Continue reading Lecture 15: The Rust Programming Language