zephir-lang / zephir

Zephir is a compiled high-level language aimed to ease the creation of C-extensions for PHP
https://zephir-lang.com
MIT License
3.27k stars 466 forks source link

Type for class properties #837

Open ovr opened 9 years ago

ovr commented 9 years ago

I suggest to add types for class properties

It gains:

namespace Test;

class Application {
    property <Di> di {get, set};

    /**
     * Optional?
     */
    property <Request> {get, set = null};
}

And require and optional

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/9899659-type-for-class-properties?utm_campaign=plugin&utm_content=tracker%2F280146&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F280146&utm_medium=issues&utm_source=github).
hylent commented 9 years ago

+1

kse300489 commented 9 years ago

+1

Green-Cat commented 9 years ago

:+1:

igorgolovanov commented 9 years ago

+1