[Gambas-user] Calling external function by pointer
Bruno Félix Rezende Ribeiro
oitofelix at ...181...
Thu May 8 19:38:51 CEST 2014
Em Thu, 8 May 2014 18:41:13 +0200
Tobias Boege <taboege at ...626...> escreveu:
> I understand if you want to be able to do all the things in pure
> Gambas but for that, new syntaxes must be created and I can't imagine
> how those could fit into the existing Basic language elements...
That's the whole point of this. I'm creating a component
entirely written in Gambas which interfaces with a complex C library.
This is a unique opportunity to discover weaknesses in Gambas language
in this particular domain. Personally I'd like to make Gambas as
simple and powerful as possible. I'd like to see Gambas as a standalone
language in the sense that everything one could possibly want to
implement with it could be done using only plain Gambas, at least in
principle. I have to respectfully disagree with you, because I can
clearly see how the improvements can nicely fit together within the
Basic language. We are already plenty of facilities to interface with
external C libraries, why not just add a few more to make Gambas
components independent of the C language? If we had reasoned by the
principle you just claimed, why on earth would Gambas support external
function declarations, for example? Does that actually fit better
within Basic than my, usually small, proposed improvements? What's the
logic behind providing several and the main facilities to interface to
external libraries and omitting a handful useful ones which would
otherwise make the language functionally complete? In my view, while
programming components, we should only resort to C(++) language for
speed, not functionality. A lack of useful functionality in a language
is not the programmer's language choice fault but a flaw in the very
language.
> To interface with C libraries, it's IMHO still best to write C
> components or at least small C cores and build a complete component
> in Gambas on top of them.
That's because we are compelled to work around Gambas limitations that
should not exist in the first place.
Regards.
--
,= ,-_-. =. Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
((_/)o o(\_)) There is no system but GNU;
`-'(. .)`-' GNU Linux-Libre is one of its official kernels;
\_/ All software must be free as in freedom;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20140508/3dc32755/attachment.sig>
More information about the User
mailing list