Programming Languages (CS302 2005S)
[Skip to Body]
Primary:
[Front Door]
[Current]
[Glance]
-
[Honesty]
[Instructions]
[Links]
Groupings:
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Readings]
[Reference]
Misc:
[SamR]
[CSC302 1999S]
Kelsey, R., Clinger, W., and Rees, J., Editors (1998). Revised5 Report on the Algorithmic Language Scheme.
Questions from: Barnes, Brantley, Edwards, Fletcher, French, Kasidhi, Kuo, Nyombayire, Rosenbluh, Shireman, Smith, Yilma
I know that Scheme has a garbage collector feature. Since this article stipulates that no object is ever destroyed. How does this feature avoid cleaning (destroying) scheme objects?
In section 1.1 of the report it is mentioned that all objects created in a Scheme computation have unlimited extent, but that storage space can be reclaimed. How does Scheme prove that an object will not matter in future computation and consequently that the space that object occupies can be reclaimed?
In the last paragraph of 1.3.2 the report notes that values of certain expressions are "unspecified." Why would expressions be described but not defined?
What is the reason for distinguishing between errors that must be detected and errors that can be ignored? Would that not undermine our confidence in the correctness of programs?
Why do they allow compiler makers to not report some errors? Is it just that detecting and reporting certain errors from the compiler would be too difficult to expect the compiler makers to do? What other reason could there be?
Why would a stored continuation allow for a function call to return more than once? I thought they skipped over intermediate returns.
In the Overview of Scheme (p3) the author states: "One distinguishing feature of Scheme is that continuations, which in most other languages only operate behind the scenes, also have "first-class" status." I'm getting caught up on what the author means by "continuations" and "first-class" status. Could I get a definition for both and potentially an example?
What exactly is the difference between common LISP and Scheme? Tail-recursiveness seems to be part of it, but I don't totally understand the notion of tail-recursiveness. Am I right in thinking that it means something like this: "If a function is given as the last parameter to another function, the old function's frame can be popped from the stack before the new function's frame is pushed on"? It might be more like the ability to tell a certain function to run right after the function you're currently in. I still don't get it.
From 4.3 - "The syntactic keyword of a macro may shadow variable bindings,..." What does syntactic mean in this context? Is there a non-syntactic keyword? What does shadow mean in this context?
In section 3.5 of the Scheme Report, it is noted that in their original version of the language, Steele and Sussman implemented both functions and actors. Later, it was noted that the interpreter handled both of these things in exactly the same way, and there was no need to include both in the language. Given that these two ideas were functionally identical, how did they differ in how they were imagined such that there was a perceived need to include both in the language?
How does scheme's model of arthimetic allow independence of types?
One comment I want to make is that it would seem difficult to assure the scope of a variable which is redefined in deeper scope, or at least to figure it out very easily. The big advantage I see of more imperative programming languages is that it is very clear how variables are scoped in a subroutine or function because there tends to be fewer levels of variable scoping. Another advantage of imperative programming languages, it seems, would be that subroutines become better documented because the scoping is more formal.
You can get surprisingly many levels of nesting in imperative languages, too. As we'll see when we get to the semantics of Scheme, the scoping rules are fairly straightforward (and easy to define).
What are the benefits and disadvantages of passing an argument by value (as in Scheme) rather than by call-by-name (Algol 60) or lazy-evaluation semantics (Haskel)?
We'll talk about this when we get to parameter passing strategies (in a few weeks)
Some of these will be of the form "we'll get to it later".
What is the definition of lambda calculus? Is it just the formal structure of a lambda expression?
The lambda calculus provides the structure and semantics of lambda expressions. Among other things, it guides how we may evaluate lambda expressions. (It was developed by my great grand-advisor.)
How does Scheme deal with exact vs. inexact arithmetic?
If you provide it with exact numbers, it does exact arithmetic. If you provide it with inexact numbers, it does inexact arithmetic. You enter exact numbers without the decimal point (if you need a number with a fractional component, use a fraction). You enter inexact numbers with the decimal point.
Why would ... be an identifier? Why not ..?
I'm not sure. It seems like they like to use it for and everything
else
in the informal definitions.
What's with the dot in lists?
If a list
has a dot before the penultimate item, it's an
indicate that it ends with (cons a b) (where a and b are
the two values around the dot) rather than (cons b null).
How does Scheme allow programmers to add large libraries to programs?
The load procedure (which you'll read about soon) suffices.
Of course, if that procedure doesn't exist, you can always use the wonderful
read and eval procedures.
What's the difference between a macro and a syntax definition?
From my perspective, there really isn't one.
What does it mean for a for a construct to be 'hygienic?'
See the definition in the report.
[Skip to Body]
Primary:
[Front Door]
[Current]
[Glance]
-
[Honesty]
[Instructions]
[Links]
Groupings:
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Readings]
[Reference]
Misc:
[SamR]
[CSC302 1999S]
Disclaimer:
I usually create these pages on the fly
, which means that I rarely
proofread them and they may contain bad grammar and incorrect details.
It also means that I tend to update them regularly (see the history for
more details). Feel free to contact me with any suggestions for changes.
This document was generated by
Siteweaver on Wed Mar 2 11:39:34 2005.
The source to the document was last modified on Mon Feb 7 07:42:10 2005.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS302/2005S/Readings/scheme1-5.html.
You may wish to
validate this document's HTML
;
;
Check with Bobby