[Geany-Devel] Let's use Vala
Thomas Martitz
thomas.martitz at xxxxx
Sun Nov 10 19:45:01 UTC 2013
Am 10.11.2013 20:27, schrieb Matthew Brush:
> On 13-11-10 07:40 AM, Colomban Wendling wrote:
>> Le 10/11/2013 05:44, Matthew Brush a écrit :
>>> Hi all,
>>>
>>> In the spirit of the previous discussions about using C99 and C++ in
>>> Geany code with similar subject lines, I'd like to take a
>>> poll/discussion for allowing the use of Vala for new/re-written Geany
>>> code. [...]
>>
>> Well… it's a little complicated. I agree that features from a
>> higher-level language could help, it being C++, Vala or something. It's
>> definitely shorter to write some things in those languages than in C,
>> and memory management is definitely easier. I see one advantage in Vala
>> over C++: that it actually is C ([1]), just like our current code.
>>
>> I agree that Vala would help if we want to port the code to something
>> more OOP-style -- since obviously the language supports it by itself. I
>> agree it's probably a good idea. But the port won't happen magically.
>>
>
> Agreed, but one of the reasons I created this thread is to get
> agreement that we *can* use Vala and then when we do any refactoring,
> it makes it that much easier. I'm sure you already know I'm bringing
> this topic up because I'm willing to do a lot of the work :)
>
>> The problem I see is that using C from Vala requires a more or less
>> manual interfacing, even if quite easy to write. This adds actual
>> complexity. We could try by porting leaf modules to Vala and see (maybe
>> utils?) -- since calling Vala API from C is native --, but it's probably
>> not the modules that would benefit the most from the language.
>>
>
> This was my same thought. There are lots of "modules" in Geany that
> could benefit from re-factorings, but even starting with some of the
> low hanging fruit like utils, uiutils, any of the existing GObjects,
> including geanyobject.c which as a demo, I converted to Vala reducing
> the lines of code count from around 400+ to around 40:
>
> Before:
> https://gist.github.com/codebrainz/7274867
>
> After:
> https://gist.github.com/codebrainz/7274865
Error 500 :(
>>
>
> Basically what I'm asking is; if someone volunteered to cleanup a
> bunch of the code, make it automatically bindable for plugins, much
> easier to maintain/read, and did it without adding a bunch of glue
> (which you actually already wrote a bunch of :), would they be wasting
> their time and have it blocked just because it's not C, or can we get
> a basic agreement, in principle, that in this case, we would be open
> to allowing some Vala in new/re-factored code?
>
I have no say in this decision but my personal response would be: Yea,
if someone did the bulk work of converting the most obvious cases to
Vala I would accept this.
Best regards
More information about the Devel
mailing list