by Andi McClure
Dynamic language blending functional and object-oriented styles.

Emily is a long term attempt to take the powerful capabilities of functional languages and make them available to people lacking the specialized knowledge (and patience for paperwork) functional languages often demand, by use of simple syntax, support for the widely-understood object-oriented paradigm, and type dynamism. An unusual amount of flexibility exists in the language due to all language entities being constructed from simple, interchangeable parts.

Emily is currently in an early, experimental state. Features slated for future addition include customizable syntax, and use of gradual typing to recover the advantages (safety, speed, type-aware syntax constructs like patterns/guards) of statically typed FP.

# Code prints:
# "Set key testValue to 15."
# "Read key testValue"
# "15."

sensor = [
    secrets = []              # This is the real object

    # Catch attempts to read a field... yes, we're inheriting from a function
    parent ^key = (
        print "Read key " key ln               # Gossip
        this.secrets key      # Then forward to secrets

    # Catch attempts to write a field...
    let ^key ^value = (
        print "Set key "  key " to " value ln
        this.secrets key = value   # Forward to secrets

sensor.testValue = 5 + 10

println: sensor.testValue
Information updated 01/25/15
View Comments