Re: How about adopting Kotlin in GNOME?

2017-11-19 Thread Tony Houghton

On 18/11/17 23:11, Adam Tauno Williams wrote:

On Sat, 2017-11-18 at 14:11 +, Tony Houghton wrote:

I've been thinking about what language I should choose if and when I
start writing a significant program using G* libraries. I don't want
to write GObjects in C any more. All that boilerplate, casting
macros, manual set up of vtables and explicit reference counting. I
will make mistakes with it.


I thought I saw that Javascript was going to the language of choice for
GNOME - yet I haven't seem much else on that front.


That was mentioned in at least one of the articles I read about Vala, 
mainly this one I think:

.
I don't think Javascript is that terrible, and it's getting better, but 
it's always going to be difficult to find bugs (probably considerably 
harder with gjs than in a browser), and you have to use some weird 
idioms to make its OOP work like other languages. The main problem for 
gjs is its bindings, so it's almost the opposite of Vala. Overall I 
really don't understand why they chose that over python.



Your question is an important one - I've been thinking the opposite -
that perhaps it is best to abandon the 'nicer' languages and just go
back to C.  More boilerplate perhaps - but less drama.


The trouble is the boilerplate has a lot of potential to add drama if 
you make a mistake. "Nicer" languages not only save you the work, but 
also make sure it's correct (well, that's the theory). Did you ever use 
GObjectBuilder (gob)? That was really nice, you would write object 
declarations in a Vala-like style and function bodies (which were 
declared inline; each gob file would generate both a .h and .c) in 
almost pure C. Nowadays the project is unmaintained. I think it was a 
one-person effort, so it should be possible for another individual to 
pick it up and do any necessary maintenance. But the big drawback for me 
is that since being spoilt by developing for Android, I would really 
miss auto-completion and edit-time error detection. I managed to write a 
usable vim syntax definition for it, based heavily on C's, but 
completion etc is a whole other level.



Vala is very attractive, but I'm afraid I have to side with the
doomsayers.


Ditto.  It looks like C# to me - mono on GNOME was great - but the
momentum is gone.  Not something I want to make a wager on.


I suspect Mono would be completely dead if it wasn't for Unity3D. Any 
project that hasn't converted from GTK2 to GTK3 by now shows that it's 
either desperately short of developer hours or the developers don't care 
about the future (or even the present) of their project. GTK2 is not OK 
any more, it's terrible with hidpi scaling enabled.



So there's Python.


The one contender with C, IMO.


supported. But... its runtime has a poor reputation for efficiency,
and  it can't truly multithread on multiple cores.


As someone who had many tens of thousands of lines of code in Python -
the multi-threaded issues are ***GROSSLY*** exagerated.  It is not a
real-world problem.


Yeah, that's not really a problem for desktop or server applications. 
But it would put me off using it for writing games (even though simple 
games don't need multiple cores), and I suspect it's holding it back a 
bit in scientific circles too.


--
TH
___
gnome-list mailing list
gnome-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-list


Re: How about adopting Kotlin in GNOME?

2017-11-18 Thread Arnaud
>>  Its GI bindings are  somewhat opaque ie it's difficult to find out
>> what members a class has, or a function's signature, if separate
>> documentation hasn't been provided.
> Absolutely true;  to often the answer is "look at the C docs and try to
> translate".  Which is a serious waste of time.
>

There's https://lazka.github.io/pgi-docs/ for the docs, it does the job
most of the time.
___
gnome-list mailing list
gnome-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-list


Re: How about adopting Kotlin in GNOME?

2017-11-18 Thread Adam Tauno Williams
On Sat, 2017-11-18 at 18:11 -0500, Adam Tauno Williams wrote:
> I thought I saw that Javascript was going to the language of choice
> for GNOME - yet I haven't seem much else on that front.
> > So there's Python. 

One advantage of Python is the existence of a World Class ORM -
SQLalchemy - and I have a hard to imagine writing any non-trivial
application without an ORM.   If there was an equivalent for
JavaScript/GJS it would be far more tempting.

-- 
Meetings Coordinator, Michigan Association of Railroad Passengers
537 Shirley St NE Grand Rapids, MI 49503-1754 Phone: 616.581.8010
E-mail: awill...@whitemice.org GPG#D95ED383 Web: http://www.marp.org
___
gnome-list mailing list
gnome-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-list


Re: How about adopting Kotlin in GNOME?

2017-11-18 Thread Adam Tauno Williams
On Sat, 2017-11-18 at 14:11 +, Tony Houghton wrote:
> I've been thinking about what language I should choose if and when I 
> start writing a significant program using G* libraries. I don't want
> to write GObjects in C any more. All that boilerplate, casting
> macros, manual set up of vtables and explicit reference counting. I
> will make mistakes with it.

I thought I saw that Javascript was going to the language of choice for
GNOME - yet I haven't seem much else on that front.

Your question is an important one - I've been thinking the opposite -
that perhaps it is best to abandon the 'nicer' languages and just go
back to C.  More boilerplate perhaps - but less drama.

> Vala is very attractive, but I'm afraid I have to side with the 
> doomsayers.

Ditto.  It looks like C# to me - mono on GNOME was great - but the
momentum is gone.  Not something I want to make a wager on.

> So there's Python. 

The one contender with C, IMO.

> supported. But... its runtime has a poor reputation for efficiency,
> and  it can't truly multithread on multiple cores.

As someone who had many tens of thousands of lines of code in Python -
the multi-threaded issues are ***GROSSLY*** exagerated.  It is not a
real-world problem.

>  Its GI bindings are  somewhat opaque ie it's difficult to find out
> what members a class has, or a function's signature, if separate
> documentation hasn't been provided.

Absolutely true;  to often the answer is "look at the C docs and try to
translate".  Which is a serious waste of time.

-- 
Adam Tauno Williams  GPG D95ED383
OpenGroupware Developer 
___
gnome-list mailing list
gnome-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-list