Re: [racket-users] Re: FFI Library Naming Conventions

2017-01-08 Thread Jens Axel Søgaard
Using prefix-out it is easy to provide the end user with both options.
One module exports the bindings without the library name prefix.
The other simply imports and reexports all bindings using prefix-out.

/Jens Axel

2017-01-08 23:18 GMT+01:00 Hendrik Boom :

> On Sun, Jan 08, 2017 at 01:43:09PM -0800, Lehi Toskin wrote:
> > On Sunday, January 8, 2017 at 8:29:49 AM UTC-8, Royall Spence wrote:
> > > I'm making some bindings for a C library. In the original library, the
> functions are named as "LIBNAME_do_stuff". Should I keep those the same in
> the FFI binding or define them as "libname-do-stuff"? Is there a convention
> for these things?
> >
> > What I like to do is libname-do-stuff, but I'm partial to the idea of
> dropping the libname part and instead just having do-stuff. That is, unless
> there's frequent naming conflicts.
>
> As a reader of programs, I find it very helpful when encountering a
> name for it to be easy to find the library that defines it.
>
> -- hendrik
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Jens Axel Søgaard

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: FFI Library Naming Conventions

2017-01-08 Thread Hendrik Boom
On Sun, Jan 08, 2017 at 01:43:09PM -0800, Lehi Toskin wrote:
> On Sunday, January 8, 2017 at 8:29:49 AM UTC-8, Royall Spence wrote:
> > I'm making some bindings for a C library. In the original library, the 
> > functions are named as "LIBNAME_do_stuff". Should I keep those the same in 
> > the FFI binding or define them as "libname-do-stuff"? Is there a convention 
> > for these things?
> 
> What I like to do is libname-do-stuff, but I'm partial to the idea of 
> dropping the libname part and instead just having do-stuff. That is, unless 
> there's frequent naming conflicts.

As a reader of programs, I find it very helpful when encountering a 
name for it to be easy to find the library that defines it.

-- hendrik

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: FFI Library Naming Conventions

2017-01-08 Thread Lehi Toskin
On Sunday, January 8, 2017 at 8:29:49 AM UTC-8, Royall Spence wrote:
> I'm making some bindings for a C library. In the original library, the 
> functions are named as "LIBNAME_do_stuff". Should I keep those the same in 
> the FFI binding or define them as "libname-do-stuff"? Is there a convention 
> for these things?

What I like to do is libname-do-stuff, but I'm partial to the idea of dropping 
the libname part and instead just having do-stuff. That is, unless there's 
frequent naming conflicts.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] FFI Library Naming Conventions

2017-01-08 Thread 'Royall Spence' via Racket Users
I'm making some bindings for a C library. In the original library, the 
functions are named as "LIBNAME_do_stuff". Should I keep those the same in the 
FFI binding or define them as "libname-do-stuff"? Is there a convention for 
these things?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.