Posts tagged Author: Ming-Ho Yee
In the first and second parts of this blog series, I defined lexical and dynamic scope, and demonstrated interesting cases of scoping in R.
In this third and final part of my blog series, I’d like to discuss a paper by the creators of R, where they motivate the need for lexical scoping in a statistical programming language.
This is a “bonus” blog post, because I’m going to dive into some of the hairier R features to show how four different kinds of scoping can be simulated in R.
In the previous post of this three-part blog series, we discussed lexical and dynamic scope. Now, in this second part, we can return to the original question: is R lexically or dynamically scoped?
This all started with a simple question about the R programming language: is R lexically or dynamically scoped?
To answer that question, we need to understand what scope is, along with lexical scope and dynamic scope.
Last semester, I took a course where the final project was to write a survey paper on “a topic in the intersection between computer systems and your area.” So I wrote about on-stack replacement.
The PL Junior Seminar is for beginning PhD and interested undergrad and masters students to understand the foundations of programming languages research. It serves to fill in background knowledge and get up to speed with different areas of PL research.
For the spring 2017 instance of PL Junior we chose program synthesis, the sequent calculus, and logic programming as topics we wanted to learn more about. We also did two group paper readings for Luca Cardelli’s Typeful Programming and Alan Kay’s Early History of Smalltalk. At the same time, we changed up the format from the previous semester.
Two weeks ago, I attended the first Programming Language Implementation Summer School, held in beautiful Bertinoro, Italy.
The goal of PLISS was “to prepare early graduate students and advanced undergraduates for research in the field,” and I think it successfully accomplished that. There were many talks in a variety of areas, such as just-in-time compilers, garbage collection, static analysis, and distributed systems. But PLISS was more than just a series of talks: PLISS provided an environment for interacting with other students as well as senior researchers.
The Programming Language Seminar, Junior (or “PL Junior”), is a seminar for junior students to learn and discuss topics at a pace more suitable to our background. This semester, we decided to study dependent types. We chose this topic because
- working from the TAPL presentation of type systems, dependent types are a step up in difficulty (excepting F-omega-sub), and
- they represent a significant increase in the reasoning power of types over programs.