Skip to content

What should an empty block evaluate to? #36

Open
@ltratt

Description

@ltratt

What should this program print?

empty_block = (
    run = (
        [] value println.
    )
)

Java SOM prints "instance of Block1". There's nothing wrong with that per se, but it wasn't what I was expecting because a) (at least as far as I know) blocks can't get access to their instances under normal circumstances b) methods return self unless otherwise specified. I wondered if this was intentional or not? I couldn't find any obvious clues in Java SOM's source to indicate anything either way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    language designThis issue requires design decisionsspecNeeds specification, or is specification related.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions