eerolanguage / eero

Eero was a fully binary- and header-compatible dialect of Objective-C, implemented with a modified version of the Apple-sponsored LLVM/clang open-source compiler. It featured a streamlined syntax, Python-like indentation, and other features that improve readability and code safety. It was inspired by languages such as Smalltalk, Python, and Ruby.
https://web.archive.org/web/20171101134337/http://eerolanguage.org/
288 stars 7 forks source link

Equivalent of Python's pass keyword? #59

Open ipmcc opened 9 years ago

ipmcc commented 9 years ago

I'm not sure if this exists and I'm not finding it, or if it doesn't exist, but it seems like eero could use something that is the equivalent of pass in Python to denote an empty scope. Like:

implementation MyDelegate
    someDelegateMethodThatWeMustImplementButWantToBeEmpty: id inCaller
        // do nothing

Presently, this causes an "Ambiguous indentation" error.

andyarvanitis commented 9 years ago

An indented semicolon does the trick:

implementation MyDelegate
    someDelegateMethodThatWeMustImplementButWantToBeEmpty: id inCaller
        ; // do nothing

It really should be stated more clearly in the docs, though, so leaving this open for now.

ipmcc commented 9 years ago

Might it also be worth adding a pass keyword to be arguably less cryptic?