You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.
I think traits / modules are awesome as they help you get the best out of dynamic typing. I'm not sure on the syntax though, PHP uses include and require keywords already, so using Include like in Ruby might be confusing. PHP uses the use keyword for this, which in my opinion might be better for our use case.
Beeing verbose is good sometimes, but maybe something like this would be nicer?
class MyClass
+SomeModule, SomeOtherModule
def some_method
# ... etc
end
end
Alternatively, we can just use the use keyword:
class MyClass
use SomeModule, SomeOtherModule
def some_method
# ... etc
end
end
I'm open to suggestions on the syntax and modules in general. I'd like to keep them simple for now. Also, this would only work on PHP 5.4+ unless we generate some ugly hacky PHP.
The text was updated successfully, but these errors were encountered:
I think traits / modules are awesome as they help you get the best out of dynamic typing. I'm not sure on the syntax though, PHP uses
include
andrequire
keywords already, so usingInclude
like in Ruby might be confusing. PHP uses theuse
keyword for this, which in my opinion might be better for our use case.Beeing verbose is good sometimes, but maybe something like this would be nicer?
Alternatively, we can just use the
use
keyword:I'm open to suggestions on the syntax and modules in general. I'd like to keep them simple for now. Also, this would only work on PHP 5.4+ unless we generate some ugly hacky PHP.
The text was updated successfully, but these errors were encountered: