chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Open question on C binding style


From: Kon Lovett
Subject: [Chicken-users] Open question on C binding style
Date: Wed, 16 Jul 2008 19:54:12 -0700

Hi Folks,

Interested in some opinions.

1) When there is a one to one mapping between a Scheme variable/ constant & a C variable/macro-constant/constant/enum should the Scheme symbol naming mirror the C naming? Should the C 'SOME_C_LIBRARY_MACCONST' identifier be mapped to the Scheme 'SOME_C_LIBRARY_MACCONST', or some Scheme'ish 'some-c-library-macconst'?

By "one to one" above I mean the Scheme variable has the same "value" as the C variable. So there is only minimal conversion for arg & ret values, usually 'unfix' & 'fix'.

When a more sophisticated conversion of arg & ret then perhaps a Scheme'ish naming is better?

2) A C procedure binding name: 'some_c_func' -> 'foreign-some-c- func' , 'some_c_func', 'C_some_c_func'?

Of cource 'some_c_func' can be ambiguous & CamelCase names look strange and can also be ambiguous.

Best Wishes,
Kon






reply via email to

[Prev in Thread] Current Thread [Next in Thread]