Subject:
[ruby-ffi] Re: ffi_lib and symbol/string usage?
From:
Wayne Meissner
Date:
11/15/09 4:01 PM
To:
ruby-ffi@googlegroups.com


2009/11/16 Jon <jon.forums@gmail.com>:
> I've updated my examples on the wiki to use only String's, but am wondering if FFI core should be agnostic for the ffi_lib arg?

I have no preference, but is there really any style reason to use
symbols over strings or vice-versa for this?

>
> I personally prefer the Symbol style but I don't really have strong feelings other than "keep lib loads fast."

Well, compared to the cost of a dlopen() call, the cost of symbol vs
string for the ffi_lib arg isn't even a rounding error.  Its
equivalent to a butterfly flapping its wings in a hurricane.