Re: enterprise ruby
- From: Charles Oliver Nutter <charles.nutter@xxxxxxx>
- Date: Sun, 11 Nov 2007 15:11:46 -0500
Rick DeNatale wrote:
In this implementation, Java primitives were written in Smalltalk.
IIRC this was either before the JNI existed, or the JNI evolved to
make this impractical, and IBM moved to a Java only VM.
I know that it's difficult, and probably premature to define a
standard extension interface which would work across the various
emerging ruby implementations. But without that I'm afraid that the
promise of having multiple implementations is somewhat muted.
This implies that it's only valid to call something an "extension" if
it's written in C. That's a bit narrow. JRuby has far better support
than MRI for writing extensions in Java, for example. Does it mean that
JRuby is somehow less-capable than MRI if it can't use C extensions? Of
course it doesn't.
The only thing it means is that existing extensions written in C for MRI
won't work in JRuby. That may limit you, if you depend on those specific
extensions. But in most cases the same functionality is provided by Java
libraries just as well. And even better, you don't need to compile
anything. You can just call the library directly.
include Java
import java.util.concurrent.ConcurrentHashMap
chm = ConcurrentHashMap.new
chm[:bar] = 'foo'
# etc
This applies to Java's GUI libraries (around which several frameworks
have been written, all in Ruby), graphics libraries, network libraries,
and so on. Ruby has a much more difficult time using any of these libraries.
So I'd say it's a matter of perspective.
Can you write extensions for JRuby? Yes. Can you write them in C? Not
easily.
Can you write extensions for MRI? Yes. Can you write them in Java? Not
easily.
- Charlie
.
- Follow-Ups:
- Re: enterprise ruby
- From: Rick DeNatale
- Re: enterprise ruby
- References:
- enterprise ruby
- From: Roger Pack
- Re: enterprise ruby
- From: Robert Klemme
- Re: enterprise ruby
- From: Lionel Bouton
- Re: enterprise ruby
- From: Charles Oliver Nutter
- Re: enterprise ruby
- From: Rick DeNatale
- enterprise ruby
- Prev by Date: Re: DBI - error loading driver
- Next by Date: Re: enterprise ruby
- Previous by thread: Re: enterprise ruby
- Next by thread: Re: enterprise ruby
- Index(es):
Relevant Pages
|