[Moved] Anything like Gnome’s Vala for Qt? (C#-like language)



  • Hello,

    Does there exist something like Gnome's Vala project for Qt?

    For those who are unfamiliar with it, Vala is a C#-like language that safely "compiles" to native C/GObject code. The idea being that C# is an easier language for new users to get productive with.

    See:
    http://live.gnome.org/Vala/FAQ



  • Missed the language bindings forum. Thanks for the move.



  • I was under the impression the reason Vala (and Genie) exists is because of the amount of boilerplate code you need to write object oriented gtk+ code in C.

    Since Qt is c++ based and already has support for OO at the language level it's not as much of an issue.



  • I was unaware of Genie. Very interesting.

    It may be that Qt's C++ reduces the sheer amount of boilerplate code, but the cleaner syntax of both of those projects would be huge win for new Qt users.

    If anything, I imagine that Qt's C++ base would make such a project easier.



  • I think such a project would really struggle to find a niche in a Qt world. The Qt MOC (Meta Object Compiler) is already a code generator which adds a lot of niceness to C++.

    In the gtk+/gnome world Vala et al were (in my opinion) desperately needed as they solved a real problem. I'd hate to imagine trying to write something like Shotwell in plain gobject C! :-S

    On the other hand (and slightly off topic), I was thinking a couple of days ago about how QML would look if it was implemented with a "CoffeeScript":http://jashkenas.github.com/coffee-script/ type syntax rather than JavaScript. It'd be an interesting experiment if nothing else.



  • kidproquo,

    That's a good point. I agree that the need is way less obvious here.

    But, even with the MOC, Qt's C++ syntax can't be as easy as Genie's python-esque style. (Python bindings don't count...)

    RE: CoffeeScript

    That's pretty nifty. Definitely a cool project to try. Although, I'm less interested in QML until the released version can be used to build standard desktop applications.

    Although, why restrict QML to JavaScript? I suppose any scripting runtime would work....



  • [quote author="nonot1" date="1305587481"]Although, why restrict QML to JavaScript? I suppose any scripting runtime would work....[/quote]

    There has also been discussion on why QML is restricted to JavaScript on the qt5-feedback mailinglist. The main points I gathered for why there will be no other scripting languages available are:

    • It complicates the architecture a lot
    • Little or no gains, at the cost of confusion for end users
    • Efforts better directed to maturing QML as it is
    • Performance critical part of QML; adding another layer of indirection is undesireable
    • JSON like syntax of QML doesn't nessecairaly play nice with languages like Python

    So: forget it. It is not going to happen.



  • I think there is a project named Qyoto which adds C# support to Qt...



  • There is also Qt Jambi, if someone likes Java ;)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.