Skip to content

Instantly share code, notes, and snippets.

@bananita
Created June 29, 2014 22:57
Show Gist options
  • Save bananita/868fe4b871dbf3663811 to your computer and use it in GitHub Desktop.
Save bananita/868fe4b871dbf3663811 to your computer and use it in GitHub Desktop.

Object-oriented languages

Assignment

In this assignment you should design and implement a minimal object-based programming language with delegation. It must be complete enough to

  • read instructions of arbitrary form (any human-readable format)
  • safely combine two or more existing prototypes
  • implement mix-ins
  • print components of given object to the screen

Example REPL session:

> ReadableNumber = Number combineWith:Readable
> counter = ReadableNumber clone set:5
> counter print
counter object:
    Variables:
        int _set = 5
    Methods:
        int read()
        set(int)
        print()

Please include few samples with your code.

The assignment is due April 6th (Sunday)

Clarification: arbitrary form means one form of input of your choise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment