From: Tobias Reif Date: 2002-03-22T00:13:39+09:00 Subject: Re: Windows version of Ruby (proposals) Dave Thomas wrote: > I have a vision for the libraries in 2.0 which I'm sure will never see > the light of day. [...] > So, here's my thinking. The basic classes you get with Ruby (Array, > Hash, Dir, File, Process etc) should *only* contain methods that are > guaranteed to be portable across all Ruby's platforms. yay! > If you code > using just these, your program will run unmodified and consistently > anywhere that Ruby runs. This assurance would really let me sleep @ night. > Then, we provide a set of environment support modules for those > classes that currently contain non-portable methods. We could have > (for example) > > module SysdepFilePosix > ... > end > > module SysdepFileWin32 > ... > end > > Mix one of these into class File and you'll get all the system > dependent calls. You'll also be explicitly marking your code as > non-portable. > > Then, to make life easier, you have a global set of files, say > sysdep_posix, sysdep_win32, sysdep_macosx etc, whose whole purpose is > to mix in the system dependent modules into _all_ the classes that > need them. Seems to be a wonderful basis for an implementation concept&strategy. > Using this scheme, we make portability an explicit feature of the > language, rather then trying to impose a half-hearted Unix layer on > everyone. This is both a very good technical idea, that makes working Ruby easier, and it also is very relevant gesture of openness and independence: Ruby is independent of platforms, at home in Ruby, not in some specific OS; and the community is open to any platform, and doesn't promote a single prefered one. The whole architecture you're proposing also makes clear: Ruby does what Ruby should, and you can expect this defined set to work well on any platform. And it makes clear that any OS specific features aren't the job of Ruby itself. Tobi -- * peace&love. * http://www.pinkjuice.com/