Re: [Vala] inline C



On Sat, 2008-12-13 at 17:46 +0000, Karl Lattimer wrote:
On Sat, 2008-12-13 at 23:44 +0600, Ildar Mulyukov wrote:
What do you think about having C inline in Vala? This looks quite  
natural for Vala. Especially while Vala is quite unperfect (having 304  
open bugs). This could ease implementing workarounds ;)

+1 it would be nicer for certain things to just use C rather than having
to write vapi e.g. the uuid.vapi I had to write for wizbit, meant more
code than just using C...

There would have to be some sanity wrapping though to make sure that the
C stuff would work properly with the vala stuff... 

I don't really like the idea of inline C in general. The only reason to
use it is to avoid writing bindings or work around bugs in the
compiler. 

Supporting full-featured inline C is not trivial as you would not only
need to be able to write C blocks in Vala methods but also make it
possible to add include directives, use C types as parameters, define
global variables or constants, and maybe add lines to the generated
header file.

In my opinion, the time is better spent on improving Vala so that nobody
needs inline C. Vala already makes it pretty easy to work on a low level
by supporting pointers and simple ad-hoc bindings with the `extern'
modifier.

Jürg




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