[fxruby-users] [Q] Proposed FXRuby 1.2 Feature Name Change

Lyle Johnson lyle at knology.net
Tue Jul 27 22:20:53 EDT 2004


All,

I am strongly considering changing the feature name -- that is, the 
string that you pass to the require() method -- from "fox" to "fox12" 
for FXRuby version 1.2. I'd like to hear any comments for and against 
such a change.

There are at least a couple of reasons for the change. One reason has 
to do with the RubyGems "stub library" feature. If you've been 
experimenting with the first few alpha releases of FXRuby 1.2, 
specifically the gems-based packages, you know that I've been 
recommending this pattern for loading FXRuby:

	require 'rubygems'
	require_gem 'fxruby'

Well, as it turns out, RubyGems also installs what they call a "stub 
library" in the standard Ruby load path, so that you can simply do 
this:

	require 'fox'

and it invokes the magic to load the gem instead. This is, generally 
speaking, a nice idea and provides some measure of 
backwards-compatibility for legacy (i.e. pre-RubyGems) code that didn't 
know to use require_gem. But what in means for FXRuby is that you can't 
really have both FXRuby 1.0 and the gem for FXRuby 1.2 installed 
simultaneously; if you do, then:

	require 'fox'

will always load FXRuby 1.2 and never "see" your FXRuby 1.0 
installation. Not a good thing. If on the other hand we change the 
feature name for FXRuby 1.2 from "fox" to "fox12", RubyGems will 
install a stub library called "fox12.rb", which won't clash with older 
FXRuby 1.0 installations that used the "fox" feature name.

But perhaps the more compelling reason for a name change at this point 
is that the APIs for FXRuby versions 1.0 and 1.2 are so different. 
Unless you get incredibly lucky, it's unlikely that a program written 
against the FXRuby 1.0 API is going to work out of the box when run 
with FXRuby 1.2. And it will be disastrous, in terms of support, if 
application developers have this variable floating around, i.e. when 
they say require 'fox', is it going to load up version 1.0 or 1.2?

So there you go. If this change goes through, I'm specifically thinking 
that (1) the gem name will change from "fxruby" to "fxruby12"; and, (2) 
the feature name will change from "fox" to "fox12". If you have an 
application or library based on FXRuby 1.0, and don't wish to port it 
to FXRuby 1.2 anytime soon, there will be less pressure to do so since 
both versions would be able to peacefully co-exist.

I don't intend to change the module name from "Fox", because you can't 
use both versions simultaneously within the same application and hence 
there should be no opportunity for namespace clashes.

OK, I think that's all I wanted to say to get the ball rolling. Now 
please shoot holes in my plan. ;)

Thanks,

Lyle



More information about the fxruby-users mailing list