[Geany-Devel] Let's use Vala

Matthew Brush mbrush at xxxxx
Sun Nov 10 19:48:55 UTC 2013


On 13-11-10 11:45 AM, Thomas Martitz wrote:
> 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 :(
>

Yeah, same here, I was hoping it would be back up by the time people 
visited or wasn't down for them :) I'm sure it'll come back online soon.

Cheers,
Matthew Brush



More information about the Devel mailing list