Examples from Class - 3. Global [CL] [AL] [foo3:]-> [<...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
3. Global [CL] [AL] [foo3:]-----> [< Global | impl of foo3] [foo5:] foo(5): [CL: Global]-----> [CL of Global ] [AL: Global] [RA | line 10] [RRA: Global : foo(5)]-----> [foo5] of Global parameters : 5 inLine 1: [CL: foo3(5)] [AL: foo3(5)] [Local Variables: foo1:------------------------->[<inLine2 | impl of foo1] foo2:]------------------------->[<inLine1 | impl of foo2] [foo2(foo1, 5)] foo2(foo1, 5): [CL: inLine1] [AL: inLine1] [RA: Line 7] [RRA:inLine1.foo2(foo1, 5)]---->[foo2(foo1, 5)] of inLine1 [f:]------------------------------------>[inLine1.impl of foo1] foo1(5): [CL: foo2(foo1, 5)]------------>[CL: inLine1] of foo2(foo1, 5) [AL: inLine1]-------------------->[CL: foo3(5)] of inLine1 [RA: Line 6]--------------------->[f:] of foo2(foo1, 5) [RRA: foo2(foo1, 5). f(x)] [y: 5] Key differences from ML and Scheme: ML is compiled and Scheme is interpreted. Type checking is different because of compiled and interpreted. ML supports loops and Scheme doesn’t. Scheme is dynamically typed and ML is statically typed. ML has struct and Scheme doesn’t.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Compare ML and C variables: Regular Variables in ML cannot be changed and in C they can. Difference between ML reference cells and C pointers. ML references addresses cannot be modified and in C they can. Pass by reference, the address and the binding cannot be modified where pointers they both can. Type: A collection of of computable values that share some structural property. Types are used for: Organization of concepts. Identify and prevent errors. Support translation.(Compiler) To prevent errors. Compiler translation. Organization of concepts. Optimizations. Basic Type: Type of atomic values-> ints Compound Types: Arrays, list, pointers Type Declaration: Declaring and value. Declare a new Type. Transparent give a name to an existing Type. Type System: Everything in a language that works and declares Types. All of the com- ponents. Type Error: When a value is misinterpreted or misused with unintended smeantics. Type-Safe: Can avoid all Type Errors. Catch errors caught at Compile-Time. Garbage collection is necessary. Polymorphism:
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/13/2009 for the course CS 3773 taught by Professor Staff during the Spring '08 term at The University of Texas at San Antonio- San Antonio.

Page1 / 10

Examples from Class - 3. Global [CL] [AL] [foo3:]-> [<...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online