CSC/ECE 517 Fall 2011/ch1 1d sr: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 10: Line 10:
=====Example in JS=====
=====Example in JS=====
=====Example in Python=====
=====Example in Python=====
==Closures in Statically Typed Languages==
===The Problem===
===Limitations of Statically Typed Languages===
====Lexical Scope====
====Functions not as first class citizens of the language====
===Implementing Closures in Statically Typed Languages===
====C : function pointers====
====C++ : function objects====
====Java : anonymous inner classes====
==Closures and Static Scoping==
===(Explanation)===
===Case study of Scheme===
==References==
==External Links==

Revision as of 18:19, 30 August 2011

Wiki Chapter: CSC/ECE 517 Fall 2011/ch1 1d sr

Introduction

Closures

What are Closures

Why Closures (Motivation, Uses, Advantages)

Closures in Dynamically Typed Languages

Example use of Closures in Dynamically Typed Langauges

Example in Ruby
Example in JS
Example in Python

Closures in Statically Typed Languages

The Problem

Limitations of Statically Typed Languages

Lexical Scope

Functions not as first class citizens of the language

Implementing Closures in Statically Typed Languages

C : function pointers

C++ : function objects

Java : anonymous inner classes

Closures and Static Scoping

(Explanation)

Case study of Scheme

References

External Links