-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Use-able module #170
Comments
It could be nice to support just use Thrift.Service,
aliases: [MyEnum, MyOtherEnum] I'm not sure that really gets us anything that the explicit aliases don't already provide though. |
I think controlling aliases has to be up to the user; and I think it should be a passthrough to the normal alias params. I really am most concerned about eliminating the |
Thrift.Service in this example is a namespace, right? As if there's a namespace elixir Thrift.Service
enum MyEnum {}
enum MyOtherEnum {} We don't currently generate a module that corresponds to a namespace like that. There would be a couple of edge cases to consider if we wanted to do so. First, things can go in the root namespace, which is another discussion but that's the current behavior. Second, different IDL files can specify the same namespace, so this would introduce a kind of name collision that otherwise doesn't exist. I don't find |
@pguillory, I couldn't disagree more, in using our event thrift, I grew very tired of aliasing and requiring a half-dozen or so enums in every file. use Thrift.Service.Enums And you're done. |
When using elixir-thrift, I found myself doing a lot of this:
I was thinking that it would be nice if we'd have something that would do the require of all the enums for us so I could do
or
I don't have opinions about much here, I just want to spur conversations and improve the ergonomics of our enums.
@pguillory @jparise @dantswain
The text was updated successfully, but these errors were encountered: