Closed ghost closed 11 years ago
(Of course, IMethodDescriptor is not at the party yet. But the annotation parsing code is all set to handle that case, callbacks are trivial, I'll just need to add it; will do that once I'm comfy with my simpl_scope resolution code.)
Also: For clarity: They're named "IDescriptor" now because I want to make it very clear that they're interfaces (I'm still a fan of hungarian notation in this context), once I'm done developing I'll get rid of the I and change their implementations to *Impl
mostly this looks very good.
there is one thing i have a concern about, which is making FieldType an enum. i understand why you want to do that. its obviously cleaner, and what you would do any time you were writing code in one language.
the downside of it is that it means that enums have to be handcrafted in the early stage of a port to any new language.
this could slow porting down.
this is why it was not done before.
also, some languages do not even support enums, so you get to issues involving that quite early in the porting process.
cheers,
andruid
On Mon, Feb 18, 2013 at 7:39 PM, Tom White notifications@github.com wrote:
So I'm reworking the way that descriptors are created so that we 1. don't have to recurse as many levels deep as we used to and 2. can actually read about and reason through the code a bit more nicely and 3 don't have as many weird structures to manage what is easily done as a callback.
I'm also introducing a subtle refactoring in that we'll reference descriptors from behind an interface, rather than just through the implementation. You can still cast what you get from these methods to the implementation, but for most scenarios this isn't nescessary.
There's one more subtle change that I'm going to introduce w/ interpretations that should remove the unescssary "enumeration" and "class" and "scalar"... but I'm just making sure that I'm getting this code right.
The description classes/interfaces are here:
https://github.com/ecologylab/simplJava/tree/beiber/simplCore/src/simpl/descriptions/beiber
The tests are here:
https://github.com/ecologylab/simplJava/tree/beiber/simplTests/test/simpl/descriptions/beiber
(The name is b/c I had the idea for this restructuring while listening to a beiber song. This is a dev branch, publishing it is of course a generally terrible practice, but I wanted to publish the branch so I could get feedback)
In general, I want to make sure that the IDescriptor interfaces are all pretty solid. There's a few pieces here and there that are missing, but what other things do we really need, at a *bare minimum?
In general, I want to audit the following interfaces:
If you see more things that need to be added, either comment them here or make them a work item. Thanks! @andruidk https://github.com/andruidk @amwebbhttps://github.com/amwebb @quyin https://github.com/quyin @rhema https://github.com/rhema @niclupfer https://github.com/niclupfer
— Reply to this email directly or view it on GitHubhttps://github.com/ecologylab/simplJava/issues/66.
andruid kerne, ph.d. director, interface ecology lab associate professor, department of computer science and engineering texas a&m university 979.862.3684 fax college station, tx 77843-3112 http://ecologylab.net
http://facebook.com/ecologylab
Interfaces are the multidimensional border zones through which the interdependent relationships of people, activities, codes, components, and systems are constituted. Interface ecology investigates the dynamic interactions of media, cultures, and disciplines that flow through interfaces.
So, the enum change isn't that new; that work was done over the holidays; see enumeration descriptor and friends...
Any language that allows for semantic groupings of variables can have enums generated for them. I described this in some of the spec work I started drafting over the holiday... So, for example, python can have an enumerated type like so:
class myEnum(object): firstVal=1 secondval=2
And references to the enum val are of the form myEnum.firstVal
Framing this differently: Implementors can also implement enums the way that our Java fieldtypes used to be implemented...
But our enumeration support was NOT working in the past, so changes were made to facilitate support.
Since enums will serialize like a special class of scalars, the simpl implementer can also choose to translate them how they see fit.
Sent from my Windows Phone
From: Andruid Kernemailto:notifications@github.com Sent: 2/18/2013 2:16 PM To: ecologylab/simplJavamailto:simplJava@noreply.github.com Cc: Tom Whitemailto:Tom.White@outlook.com Subject: Re: [simplJava] [ClassDescriptor Rework] Other things to add to IDescriptor Interfaces? (#66)
mostly this looks very good.
there is one thing i have a concern about, which is making FieldType an enum. i understand why you want to do that. its obviously cleaner, and what you would do any time you were writing code in one language.
the downside of it is that it means that enums have to be handcrafted in the early stage of a port to any new language.
this could slow porting down.
this is why it was not done before.
also, some languages do not even support enums, so you get to issues involving that quite early in the porting process.
cheers,
andruid
On Mon, Feb 18, 2013 at 7:39 PM, Tom White notifications@github.com wrote:
So I'm reworking the way that descriptors are created so that we 1. don't have to recurse as many levels deep as we used to and 2. can actually read about and reason through the code a bit more nicely and 3 don't have as many weird structures to manage what is easily done as a callback.
I'm also introducing a subtle refactoring in that we'll reference descriptors from behind an interface, rather than just through the implementation. You can still cast what you get from these methods to the implementation, but for most scenarios this isn't nescessary.
There's one more subtle change that I'm going to introduce w/ interpretations that should remove the unescssary "enumeration" and "class" and "scalar"... but I'm just making sure that I'm getting this code right.
The description classes/interfaces are here:
https://github.com/ecologylab/simplJava/tree/beiber/simplCore/src/simpl/descriptions/beiber
The tests are here:
https://github.com/ecologylab/simplJava/tree/beiber/simplTests/test/simpl/descriptions/beiber
(The name is b/c I had the idea for this restructuring while listening to a beiber song. This is a dev branch, publishing it is of course a generally terrible practice, but I wanted to publish the branch so I could get feedback)
In general, I want to make sure that the IDescriptor interfaces are all pretty solid. There's a few pieces here and there that are missing, but what other things do we really need, at a *bare minimum?
In general, I want to audit the following interfaces:
If you see more things that need to be added, either comment them here or make them a work item. Thanks! @andruidk https://github.com/andruidk @amwebbhttps://github.com/amwebb @quyin https://github.com/quyin @rhema https://github.com/rhema @niclupfer https://github.com/niclupfer
— Reply to this email directly or view it on GitHubhttps://github.com/ecologylab/simplJava/issues/66.
andruid kerne, ph.d. director, interface ecology lab associate professor, department of computer science and engineering texas a&m university 979.862.3684 fax college station, tx 77843-3112 http://ecologylab.net
http://facebook.com/ecologylab
Interfaces are the multidimensional border zones through which the interdependent relationships of people, activities, codes, components, and systems are constituted. Interface ecology investigates the dynamic interactions of media, cultures, and disciplines that flow through interfaces.
Reply to this email directly or view it on GitHub: https://github.com/ecologylab/simplJava/issues/66#issuecomment-13740763
sigh. o.k.
On Mon, Feb 18, 2013 at 8:27 PM, Tom White notifications@github.com wrote:
So, the enum change isn't that new; that work was done over the holidays; see enumeration descriptor and friends...
Any language that allows for semantic groupings of variables can have enums generated for them. I described this in some of the spec work I started drafting over the holiday... So, for example, python can have an enumerated type like so:
class myEnum(object): firstVal=1 secondval=2
And references to the enum val are of the form myEnum.firstVal
Framing this differently: Implementors can also implement enums the way that our Java fieldtypes used to be implemented...
But our enumeration support was NOT working in the past, so changes were made to facilitate support.
Since enums will serialize like a special class of scalars, the simpl implementer can also choose to translate them how they see fit.
Sent from my Windows Phone
From: Andruid Kernemailto:notifications@github.com Sent: 2/18/2013 2:16 PM To: ecologylab/simplJavamailto:simplJava@noreply.github.com Cc: Tom Whitemailto:Tom.White@outlook.com Subject: Re: [simplJava] [ClassDescriptor Rework] Other things to add to IDescriptor Interfaces? (#66)
mostly this looks very good.
there is one thing i have a concern about, which is making FieldType an enum. i understand why you want to do that. its obviously cleaner, and what you would do any time you were writing code in one language.
the downside of it is that it means that enums have to be handcrafted in the early stage of a port to any new language.
this could slow porting down.
this is why it was not done before.
also, some languages do not even support enums, so you get to issues involving that quite early in the porting process.
cheers,
andruid
On Mon, Feb 18, 2013 at 7:39 PM, Tom White notifications@github.com wrote:
So I'm reworking the way that descriptors are created so that we 1. don't have to recurse as many levels deep as we used to and 2. can actually read about and reason through the code a bit more nicely and 3 don't have as many weird structures to manage what is easily done as a callback.
I'm also introducing a subtle refactoring in that we'll reference descriptors from behind an interface, rather than just through the implementation. You can still cast what you get from these methods to the implementation, but for most scenarios this isn't nescessary.
There's one more subtle change that I'm going to introduce w/ interpretations that should remove the unescssary "enumeration" and "class" and "scalar"... but I'm just making sure that I'm getting this code right.
The description classes/interfaces are here:
https://github.com/ecologylab/simplJava/tree/beiber/simplCore/src/simpl/descriptions/beiber
The tests are here:
https://github.com/ecologylab/simplJava/tree/beiber/simplTests/test/simpl/descriptions/beiber
(The name is b/c I had the idea for this restructuring while listening to a beiber song. This is a dev branch, publishing it is of course a generally terrible practice, but I wanted to publish the branch so I could get feedback)
In general, I want to make sure that the IDescriptor interfaces are all pretty solid. There's a few pieces here and there that are missing, but what other things do we really need, at a *bare minimum?
In general, I want to audit the following interfaces:
If you see more things that need to be added, either comment them here or make them a work item. Thanks! @andruidk https://github.com/andruidk @amwebb< https://github.com/amwebb> @quyin https://github.com/quyin @rhema https://github.com/rhema @niclupfer https://github.com/niclupfer
— Reply to this email directly or view it on GitHub< https://github.com/ecologylab/simplJava/issues/66>.
andruid kerne, ph.d. director, interface ecology lab associate professor, department of computer science and engineering texas a&m university 979.862.3684 fax college station, tx 77843-3112 http://ecologylab.net
http://facebook.com/ecologylab
Interfaces are the multidimensional border zones through which the interdependent relationships of people, activities, codes, components, and systems are constituted. Interface ecology investigates the dynamic interactions of media, cultures, and disciplines that flow through interfaces.
Reply to this email directly or view it on GitHub: https://github.com/ecologylab/simplJava/issues/66#issuecomment-13740763
— Reply to this email directly or view it on GitHubhttps://github.com/ecologylab/simplJava/issues/66#issuecomment-13741367.
andruid kerne, ph.d. director, interface ecology lab associate professor, department of computer science and engineering texas a&m university 979.862.3684 fax college station, tx 77843-3112 http://ecologylab.net
http://facebook.com/ecologylab
Interfaces are the multidimensional border zones through which the interdependent relationships of people, activities, codes, components, and systems are constituted. Interface ecology investigates the dynamic interactions of media, cultures, and disciplines that flow through interfaces.
can we also have getNamespace() and getSimpleName() or something like that in IClassDescriptor? it will just be very handy.
other than that it looks good to me.
Best Regards, Yin Qu (屈垠)
On Mon, Feb 18, 2013 at 1:39 PM, Tom White notifications@github.com wrote:
So I'm reworking the way that descriptors are created so that we 1. don't have to recurse as many levels deep as we used to and 2. can actually read about and reason through the code a bit more nicely and 3 don't have as many weird structures to manage what is easily done as a callback.
I'm also introducing a subtle refactoring in that we'll reference descriptors from behind an interface, rather than just through the implementation. You can still cast what you get from these methods to the implementation, but for most scenarios this isn't nescessary.
There's one more subtle change that I'm going to introduce w/ interpretations that should remove the unescssary "enumeration" and "class" and "scalar"... but I'm just making sure that I'm getting this code right.
The description classes/interfaces are here:
https://github.com/ecologylab/simplJava/tree/beiber/simplCore/src/simpl/descriptions/beiber
The tests are here:
https://github.com/ecologylab/simplJava/tree/beiber/simplTests/test/simpl/descriptions/beiber
(The name is b/c I had the idea for this restructuring while listening to a beiber song. This is a dev branch, publishing it is of course a generally terrible practice, but I wanted to publish the branch so I could get feedback)
In general, I want to make sure that the IDescriptor interfaces are all pretty solid. There's a few pieces here and there that are missing, but what other things do we really need, at a *bare minimum?
In general, I want to audit the following interfaces:
If you see more things that need to be added, either comment them here or make them a work item. Thanks! @andruidk https://github.com/andruidk @amwebbhttps://github.com/amwebb @quyin https://github.com/quyin @rhema https://github.com/rhema @niclupfer https://github.com/niclupfer
— Reply to this email directly or view it on GitHubhttps://github.com/ecologylab/simplJava/issues/66.
Added IMetadataProvider, but I thik that beyond the generics this is pretty much done. Since generics are tracked w/ another item, this should be done for now.
So I'm reworking the way that descriptors are created so that we 1. don't have to recurse as many levels deep as we used to and 2. can actually read about and reason through the code a bit more nicely and 3 don't have as many weird structures to manage what is easily done as a callback.
I'm also introducing a subtle refactoring in that we'll reference descriptors from behind an interface, rather than just through the implementation. You can still cast what you get from these methods to the implementation, but for most scenarios this isn't nescessary.
There's one more subtle change that I'm going to introduce w/ interpretations that should remove the unescssary "enumeration" and "class" and "scalar"... but I'm just making sure that I'm getting this code right.
The description classes/interfaces are here: https://github.com/ecologylab/simplJava/tree/beiber/simplCore/src/simpl/descriptions/beiber
The tests are here: https://github.com/ecologylab/simplJava/tree/beiber/simplTests/test/simpl/descriptions/beiber
(The name is b/c I had the idea for this restructuring while listening to a beiber song. This is a dev branch, publishing it is of course a generally terrible practice, but I wanted to publish the branch so I could get feedback)
In general, I want to make sure that the IDescriptor interfaces are all pretty solid. There's a few pieces here and there that are missing, but what other things do we really need, at a *bare minimum?
In general, I want to audit the following interfaces: https://github.com/ecologylab/simplJava/blob/beiber/simplCore/src/simpl/descriptions/beiber/IClassDescriptor.java
https://github.com/ecologylab/simplJava/blob/beiber/simplCore/src/simpl/descriptions/beiber/IFieldDescriptor.java
https://github.com/ecologylab/simplJava/blob/beiber/simplCore/src/simpl/descriptions/beiber/IMetaInformation.java
https://github.com/ecologylab/simplJava/blob/beiber/simplCore/src/simpl/descriptions/beiber/IParameterDescriptor.java
If you see more things that need to be added, either comment them here or make them a work item. Thanks! @andruidk @amwebb @quyin @rhema @niclupfer