Re: Creating and using a .DLL/.SO?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Why would you use open_dll() to include a translated include file?

I thought you'd just do

include dbi_mysql.so as mysql 

and that'd signal to the interpreter to attempt to call the translator hooks to cause the seamless integration (whereas the open_dll() call would work, but then you'd still have to deal with calling the translated code as C code from inside the euphoria code).

Also, once the infrastructure for translated includes is in place, I don't see why

include dbi_mysql.il as mysql 

would be a problem either.

jeremy said...
mattlewis said...

My basic idea is to create a system where the user can't even tell the difference between using an interpreted vs translated include file.

...

I do not see how this would handle:

open_dll("dbi_mysql.so") 
open_dll("dbi_pgsql.so") 
open_dll("dbi_eds.so") 

Where all three .so files defined 20 functions/procedures of the exact same name. If the plan is to allow namespaces on these, then that would make life pretty difficult to make transparent calls. For instance, to further the above code, the programmer would have to know what database backend was being used:

mysql:dbi_open() 
pgsql:dbi_open() 
eds:dbi_open() 

The whole idea of many plugin modules, dbi interfaces, etc... is to make it so the programmer could care less what module/dbi interface was being used.

Jeremy

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu