is Cobra for me or quest for perfect language
Posted: Mon May 27, 2013 11:53 pm
Hello,
tl;dr: I'm looking for the most adequate language to be used for multi-platform desktop app and here are some questions in regard and some feedback about my current findings as well.
Despite all the hype about web/cloud/JS/HTML5/mobile/whatever, I still believe and have need for good old desktop GUI application.
Linux (Debian) is my native platform and although I have not access to Mac OS machine, while Win XP is only present under by vbox, still I'd like to offer my future open-source project to those users.
During my education I had to encounter many mostly imperative languages and did my thesis using Zortech C++ compiler. It was many years ago and then some years back I decided to 'come back' to programming to write something for my own needs.
I belive that in 21st century programmer deserves something better than C(++), so those are languages which I do not want to use trying to avoid fiddling with pointer bugs etc. That's why I'm looking for some statically typed language providing some memory safety, being pleasurable to program in etc.
Few years ago I tried with Haskell - like the language and its syntax, FP makes lot of sense to me, but I realized that it seems one has to read to many academic papers in order to properly use it...I could not say I did grok monads and few potential contributors for my project simply run away in fear considering Haskell's steep learning curve.
I did postpone project being busy with life...and sometime ago, I did resumy my quest for 'perfect'* language.
*: don't worry, I'm well aware there is no such thing in this material world.
Looking for something similar to Haskell, but more pragmatic, I evaluated D for some time, but after watching the community, I noticed that there is not much interest in GUI apps, and at the current moment there are only GtkD bindings mostly maintained by single person.
Moreover, it looks as D is not memory-safe (yet) as advertised and minor compiler released break the code.
The search has brought me to OCaml as well, which sounds as 'practical Haskell', but considering that I want to write desktop GUI application, I concluded that maybe FP language is not the most appropriate tool considering that almost all GUI libs are OO-ed. (GUI apps are also not OCaml's niche.)
The next on the list was/is Ada which brings some nice features in he 2012 release, actively maintained, bus-factor > 1 community etc.
Moreover, there are Qt bindings available which is big plus.
Let me say that I'm mostly running gtk apps on my Linux Debian desktop and was using Xfce for long time (recently switched to just i3 wm).
However, I never did any gtk programming, heard from many devs how they are displeased with move to gtk3 which breaks API too often and general strategy in regard to the future of gtk+ development. Many do not plan at all to move to gtk3...
Another consideration is that there are practically no devs working on Win & Mac OS ports and gtk apps does not look great, especially on Mac (as I'm told).
For long time I really liked wx since it's practically the only toolkit providing native look on every platform, but realizing how long they are not able to release 3.0 (it looks as only one man is working on it), it seems that using Qt is the best bet for the future - iow. the least bad choice.
While evaluating Ada, I heard and tried Nimrod - very nice language, with clean syntax, but very small community and only gtk bindings. FFI provides for calling C, but to get Qt bindings is probably not easy, so I was almost settled to use Ada and even placed an order for the Barnes 95 book which got lost on the way to Croatia which made me thinking that maybe I should consider something else.
One option, which looks as last resort, is too simply use Python + PyQt and resolve all potential GUI-related problems and use Cython to improve performance when needed as well as to provide nice higher-level pythonic API for the 3rd aprty C library which we need for some number crunching.
Here, I also tried Nuitka and consider(ed) PyPy.
Then, by reading interesting post I did find about Cobra. (Yesterday I also inquired about Felix which seems very interesting and powerful, but probably too close to C++. We also quickly dismissed Haxe.) Here is also Rust, actively developed, backed up by Mozilla, but syntax is not thrilling and no GUI bindings (yet).
Now let me say few things which I like very much about Cobra:
[*] very nice & clean syntax and considering I'm going to use Python/Django for web development, there would be less gear-changing if using Cobra
[*] active development
[*] nice web site with plenty of documentation
[*] language features with some FP spices
[*] availability of several GUI bindings (qt, gtk, wx), afaict
[*] (probably) decent performance due to compiled language
There are some things which I'd like to see, but probably/hopefully not of topmost priority:
[*] using some DVCS (e.g. git) instead of svn for code repo
[*] larger community
[*] packages available for Linux distros as well as Win/Mac installers
[*] mailing list (possibly subscribed to Gmane) instead of web forum
Disclaimer: let me say that all the above points are not based using of Cobra, but it's just my observation.
Now something about my main concern:
[*] dependancy on .NET/Mono
In listing several languages which I considered so far, I didn't mention some important ones like the those in Lisp-family since too much parens is not my taste and those langs are usually not really meant for GUI apps.
As far as Java is concerned, I really never like the language (starting with its syntax) up to the (false) promises of write-once-run-everywhere along with its GUI-ugliness, so I'm also not so excited about JVM port and do not use any Java app.
C# was considered briefly, but the syntax is also too noisy for me, although I understand it's nice & powerful language.
However, I do fear what might happen in the future with Mono 'cause one never knows with Microsoft when it comes to open-source projects.
After I had some chat with Charles on IRC yesterday, I went to read Mono wikipedia page which has Mono and Microsoft's patents section which few footnoes leading to stuff like:
[*] Microsoft's Empty Promise
[*] Why free software shouldn't depend on Mono or C#
[*] Fedora is concerned about Mono
I fully understand Charles' decision to not re-invent the wheel and take advantage of the whole and mature ecosystem and work on the essential issue - language itself.
If someone would pay me to work on the project using Cobra, I probably wouldn't think twice, but since I plan to invest my precious free time (being family man with kid, struggling with my own business etc.), the last thing which I'd like is to have to rewrite the whole thing in a few years due to some stupid licensing issues.
The author of Felix when replying to my post wrote nicely: "The desire is not surprising but the ability limited." alluding to the choices of adequate programming language if one wants to avoid C(++).
Now, if I try to summarize everything, there are few possible alternatives to Cobra which raises some questions:
[*] Ada has gtk/qt bindings, bigger community, real company behind the (GNAT) compiler, modern features like contracts, concurrent/parallel programming (taking advantage of multi-core CPUs), so I wonder why to e.g. choose Cobra over it?
[*] Nimrod compiles to native C code, has clean syntax, gtk bindings (which seems to be preferrable even with Cobra), (probably) the same/similar size of community and/or number of core devs (btw. is Charles the only core Cobra dev?) so why to choose Cobra over it?
[*] PyQt+Cython is mature combination, lot of support, but probably worser performance and/or fiddling with dynamic typing only and associated runtime errors, so considering that Cobra is very close to Python in some aspects, maybe it's easier to decide in this case, but I'll still appreciate any input.
I apologize for longer post, but I hope it will help some potential Cobra users in the future finding themselves in a similar situation.
Anyone can shed some light?
tl;dr: I'm looking for the most adequate language to be used for multi-platform desktop app and here are some questions in regard and some feedback about my current findings as well.
Despite all the hype about web/cloud/JS/HTML5/mobile/whatever, I still believe and have need for good old desktop GUI application.
Linux (Debian) is my native platform and although I have not access to Mac OS machine, while Win XP is only present under by vbox, still I'd like to offer my future open-source project to those users.
During my education I had to encounter many mostly imperative languages and did my thesis using Zortech C++ compiler. It was many years ago and then some years back I decided to 'come back' to programming to write something for my own needs.
I belive that in 21st century programmer deserves something better than C(++), so those are languages which I do not want to use trying to avoid fiddling with pointer bugs etc. That's why I'm looking for some statically typed language providing some memory safety, being pleasurable to program in etc.
Few years ago I tried with Haskell - like the language and its syntax, FP makes lot of sense to me, but I realized that it seems one has to read to many academic papers in order to properly use it...I could not say I did grok monads and few potential contributors for my project simply run away in fear considering Haskell's steep learning curve.
I did postpone project being busy with life...and sometime ago, I did resumy my quest for 'perfect'* language.
*: don't worry, I'm well aware there is no such thing in this material world.
Looking for something similar to Haskell, but more pragmatic, I evaluated D for some time, but after watching the community, I noticed that there is not much interest in GUI apps, and at the current moment there are only GtkD bindings mostly maintained by single person.
Moreover, it looks as D is not memory-safe (yet) as advertised and minor compiler released break the code.
The search has brought me to OCaml as well, which sounds as 'practical Haskell', but considering that I want to write desktop GUI application, I concluded that maybe FP language is not the most appropriate tool considering that almost all GUI libs are OO-ed. (GUI apps are also not OCaml's niche.)
The next on the list was/is Ada which brings some nice features in he 2012 release, actively maintained, bus-factor > 1 community etc.
Moreover, there are Qt bindings available which is big plus.
Let me say that I'm mostly running gtk apps on my Linux Debian desktop and was using Xfce for long time (recently switched to just i3 wm).
However, I never did any gtk programming, heard from many devs how they are displeased with move to gtk3 which breaks API too often and general strategy in regard to the future of gtk+ development. Many do not plan at all to move to gtk3...
Another consideration is that there are practically no devs working on Win & Mac OS ports and gtk apps does not look great, especially on Mac (as I'm told).
For long time I really liked wx since it's practically the only toolkit providing native look on every platform, but realizing how long they are not able to release 3.0 (it looks as only one man is working on it), it seems that using Qt is the best bet for the future - iow. the least bad choice.
While evaluating Ada, I heard and tried Nimrod - very nice language, with clean syntax, but very small community and only gtk bindings. FFI provides for calling C, but to get Qt bindings is probably not easy, so I was almost settled to use Ada and even placed an order for the Barnes 95 book which got lost on the way to Croatia which made me thinking that maybe I should consider something else.
One option, which looks as last resort, is too simply use Python + PyQt and resolve all potential GUI-related problems and use Cython to improve performance when needed as well as to provide nice higher-level pythonic API for the 3rd aprty C library which we need for some number crunching.
Here, I also tried Nuitka and consider(ed) PyPy.
Then, by reading interesting post I did find about Cobra. (Yesterday I also inquired about Felix which seems very interesting and powerful, but probably too close to C++. We also quickly dismissed Haxe.) Here is also Rust, actively developed, backed up by Mozilla, but syntax is not thrilling and no GUI bindings (yet).
Now let me say few things which I like very much about Cobra:
[*] very nice & clean syntax and considering I'm going to use Python/Django for web development, there would be less gear-changing if using Cobra
[*] active development
[*] nice web site with plenty of documentation
[*] language features with some FP spices
[*] availability of several GUI bindings (qt, gtk, wx), afaict
[*] (probably) decent performance due to compiled language
There are some things which I'd like to see, but probably/hopefully not of topmost priority:
[*] using some DVCS (e.g. git) instead of svn for code repo
[*] larger community
[*] packages available for Linux distros as well as Win/Mac installers
[*] mailing list (possibly subscribed to Gmane) instead of web forum
Disclaimer: let me say that all the above points are not based using of Cobra, but it's just my observation.
Now something about my main concern:
[*] dependancy on .NET/Mono
In listing several languages which I considered so far, I didn't mention some important ones like the those in Lisp-family since too much parens is not my taste and those langs are usually not really meant for GUI apps.
As far as Java is concerned, I really never like the language (starting with its syntax) up to the (false) promises of write-once-run-everywhere along with its GUI-ugliness, so I'm also not so excited about JVM port and do not use any Java app.
C# was considered briefly, but the syntax is also too noisy for me, although I understand it's nice & powerful language.
However, I do fear what might happen in the future with Mono 'cause one never knows with Microsoft when it comes to open-source projects.
After I had some chat with Charles on IRC yesterday, I went to read Mono wikipedia page which has Mono and Microsoft's patents section which few footnoes leading to stuff like:
[*] Microsoft's Empty Promise
[*] Why free software shouldn't depend on Mono or C#
[*] Fedora is concerned about Mono
I fully understand Charles' decision to not re-invent the wheel and take advantage of the whole and mature ecosystem and work on the essential issue - language itself.
If someone would pay me to work on the project using Cobra, I probably wouldn't think twice, but since I plan to invest my precious free time (being family man with kid, struggling with my own business etc.), the last thing which I'd like is to have to rewrite the whole thing in a few years due to some stupid licensing issues.
The author of Felix when replying to my post wrote nicely: "The desire is not surprising but the ability limited." alluding to the choices of adequate programming language if one wants to avoid C(++).
Now, if I try to summarize everything, there are few possible alternatives to Cobra which raises some questions:
[*] Ada has gtk/qt bindings, bigger community, real company behind the (GNAT) compiler, modern features like contracts, concurrent/parallel programming (taking advantage of multi-core CPUs), so I wonder why to e.g. choose Cobra over it?
[*] Nimrod compiles to native C code, has clean syntax, gtk bindings (which seems to be preferrable even with Cobra), (probably) the same/similar size of community and/or number of core devs (btw. is Charles the only core Cobra dev?) so why to choose Cobra over it?
[*] PyQt+Cython is mature combination, lot of support, but probably worser performance and/or fiddling with dynamic typing only and associated runtime errors, so considering that Cobra is very close to Python in some aspects, maybe it's easier to decide in this case, but I'll still appreciate any input.
I apologize for longer post, but I hope it will help some potential Cobra users in the future finding themselves in a similar situation.
Anyone can shed some light?