Re: Supporting multiple versions of an API

2012-08-07 Thread Intransition
On Thursday, August 2, 2012 5:16:34 PM UTC-4, Robert Klemme wrote: > > > So it's *not* the user deciding on the API version! That's a > different situation. Or does the user present the loaded YAML file? > Can you be a bit more specific about your usage scenario? > Well ultimately the user c

Re: Supporting multiple versions of an API

2012-08-02 Thread Robert Klemme
On Thu, Aug 2, 2012 at 10:08 PM, Intransition wrote: > > > On Thursday, August 2, 2012 12:14:27 PM UTC-4, Robert Klemme wrote: >> >> On Thu, Aug 2, 2012 at 4:47 PM, Intransition wrote: >> >> > Yes, that's the traditional factory approach. I actually would not want >> > to >> > use "MainFactory",

Re: Supporting multiple versions of an API

2012-08-02 Thread Intransition
On Thursday, August 2, 2012 12:14:27 PM UTC-4, Robert Klemme wrote: > > On Thu, Aug 2, 2012 at 4:47 PM, Intransition wrote: > > > Yes, that's the traditional factory approach. I actually would not want > to > > use "MainFactory", as don't want it to be explicit. But it occurs to me > that >

Re: Supporting multiple versions of an API

2012-08-02 Thread Intransition
On Thursday, August 2, 2012 10:47:19 AM UTC-4, Intransition wrote: > > >> It splits things up into maintainable files quite nicely, and also has >> less parsing (for what that's worth.) However it wouldn't work if you >> need two different versions of Main in the one program. >> > > Yep. Exact

Re: Supporting multiple versions of an API

2012-08-02 Thread Robert Klemme
On Thu, Aug 2, 2012 at 4:47 PM, Intransition wrote: > Yes, that's the traditional factory approach. I actually would not want to > use "MainFactory", as don't want it to be explicit. But it occurs to me that > I could have redefined `Main.new` as a factory method and done it that way. > And the m

Re: Supporting multiple versions of an API

2012-08-02 Thread Intransition
On Monday, July 30, 2012 9:28:04 PM UTC-4, Matthew Kerwin wrote: > > > For what it's worth, I kind of like this solution, but I get the > feeling there's something not quite right about it. Same here, but it's probably just b/c its unusual --its not something you can really do in any other la

Supporting multiple versions of an API

2012-07-30 Thread Intransition
Any recommendations on the management of API versions. I have a case in which it is important that my library support all versions. For example, currently I am basically doing: module MyLib module V0 module Main ... end end class Main def initialize(versi