Question 1 @ 2024-01-16 18:26
Which of the following subjects is going to be the most important one in the context of this class?
- Syntax
- Semantics
- Idioms
- Libraries
- Typechecking
- Compilation vs Interpretation
Question 2 @ 2024-01-16 18:31
Which of the following subjects is going to be the second most important one in the context of this class?
- Syntax
- Semantics
- Idioms
- Libraries
- Typechecking
- Compilation vs Interpretation
Question 3 @ 2024-01-16 18:34
Which of the following subjects is going to be the least important one in the context of this class?
- Syntax
- Semantics
- Idioms
- Libraries
- Typechecking
- Compilation vs Interpretation
Question 4 @ 2024-01-16 18:35
Here’s a dad-joke:
- Why is “abbreviated” such a long word?
There’s a whole bunch of these things:
- Why is “short” longer than “long”?
- Why is “big” smaler than “small”?
- Why is “syllable” longer than “word”?
- Why is “million” the same length as “hundred”?
What makes these sentences funny (at least in a dad-joke-sense)?
- They put contrasting words into the same context.
- They misuse quotation marks.
- Scare quotes are always funny-ish.
- They confuse syntax and semantics.
- This question is in no way related to PL and therefore deserves no answer.
Question 5 @ 2024-01-16 18:38
You’re about to spend some time on a deserted island, doing list-related
activities. You’re given null
, and the two accessor functions car
and cdr
(or first
and rest
). In addition to that you need one more
constructor function to make lists: which one should you choose?
Some reminder expressions that return the same list:
(cons 1 (cons 2 (cons 3 null)))
(list 1 2 3)
(append (list 1) (list 2 3))
(list 1 2 3)
(append (list 1) (list 2 3))
-
cons
, because it’s the list cons-tructor. -
cons
, because it’s the most versatile. -
list
, because it’s the obvious constructor for lists. -
list
, because it’s more convenient to use thancons
. -
append
, because it’s more powerful.