PLQ #2Done on:   Tuesday, October 6th

Question 1 @ 2020-10-06 18:22

We talked about the syntax world vs the semantics world.

Where does type-checking belong?

  1. In the runtime world

  2. In the semantic world

  3. It’s a third world

  4. It’s unrelated to how code runs therefore the question doesn’t make any sense.

  5. In the syntactic world.

Question 2 @ 2020-10-06 18:45

How many identifiers do we have in this program:

(let ([x 1] [y 2])
  (let ([x y] [y x])
    (list 'x= x 'y= y)))

(Reminder: each identifier comes from one binding occurrence.)

Answers were 1–6, or 7 for “0”.

Question 3 @ 2020-10-06 19:22

I just said:

This will work if we evaluate the named fun expression to itself.

What’s the horrible thing I did in this sentence?

  1. I talked about evaluation of functions without explaining it first.
  2. This should eventually become an error.
  3. I cursed twice while saying that sentence since I hit my tow on the table corner.
  4. I did the same confusion thing between the syntax and the semantics that I talked about so much.

Question 4 @ 2020-10-06 20:29

We can drop the with from FLANG because we can replace any use:

{with {x V} B}

with

{call {fun {x} B} V}

Is this symmetric? – Could we similarly drop the call+fun and manage with just with?

  1. Of course not, we can express more ideas since we broke with into two independent features
  2. Of course we can, we just need to do a similar substitution as above in reverse.
  3. The question is nonsensical, because even the above loses us the ability to bind values.