[Qt-interest] C++ + QT vs C#

Scott Aron Bloom Scott.Bloom at sabgroup.com
Fri Mar 20 07:03:35 CET 2009


Maybe you missed my point.  The project looks very cool..  What doesn't make sense to me... isn't Qyoto... Its C# on unix...

C# IMNSHO is purely a "We don't want to pay licensing fees to Sun" language... I am not a huge Java fan, but it serves a purpose...

I understand why MS created/bought and now markets C#.. I have coded quite a bit with it.. however, without a .NET equivalent framework behind it... how will you be able to use it?

My mainsoft comment was this..  MainSofts "purpose" was to provide a MFC and Win32 set of functionality on top of X11 environments.  So that when I wrote my code on windows, I could in theory rebuild it on X11.. and it would run...

So if I write C# on my windows box, if I only wrote C# without any framework calls.. would C# ever be the language of choice?

Isnt that what your providing with a linux version of the .net framework calls...

I couldn't find on the qyoto site what framework libraries are provided. 

Please note... The project does look like a great exercise..  Im just not sure of the viability of the C# language for anything besides... MS windows development.

Scott

> -----Original Message-----
> From: Pau Garcia i Quiles [mailto:pgquiles at elpauer.org]
> Sent: Thursday, March 19, 2009 8:39 AM
> To: Scott Aron Bloom
> Cc: qt-interest at trolltech.com
> Subject: Re: [Qt-interest] C++ + QT vs C#
> 
> Hello,
> 
> Qyoto does not try to replicate .NET and it has nothing to do with
> what MainSoft did.
> 
> Qyoto is just a C# binding to Qt, nothing less, nothing more. It
> allows you to develop Qt applications using C# instead of C++, on
> Windows (using Microsoft's CLR and .NET), Linux (and *BSD, Solaris,
> etc) and Mac (using Mono). Like Qt Jambi did for Java using the JVM.
> 
> There are other Qt bindings for languages such as Ruby, Python, PHP,
> Falcon, Lisp and more, by the way. It's not a matter of platform
> (Linux, Windows, etc) but a matter of using a particular programming
> language (C#, Java, etc). A long time ago, there were even pure C
> bindings to Qt.
> 
> is like Qt Jambi
> 
> On Thu, Mar 19, 2009 at 3:34 PM, Scott Aron Bloom
> <Scott.Bloom at sabgroup.com> wrote:
> > Im not sure why there is a project for this...
> >
> > Build your application with CLR turned on, and call all the C# you want.  I
> haven't tried it, but since QT is linked in dynamically, it shouldn't be a
> problem.
> >
> > And I certainly don't understand why someone would want to use C# on unix...
> seriously... why?  You have Java..
> >
> > And the reality is...C# was designed to kill Java... but lets not turn this
> into a C# vs Java flame war...
> >
> >
> > The CLR system is REALLY cool,being able to "include" a DLL and be able to
> instantiate C# or C++ or VB or Java objects in C++ really is quite a lot
> easier than using active X/COM calls...
> >
> > But Im still confused... why use C++/Qt and C# on a linux based system?
>  What does C# bring there...
> >
> > On windows, I could see it, there are TONS of libs being put out in C# with
> CLR, but without a functional .NET framework for the C# code to run against..
> why bother?   I can only assume the Qyoto projects main effort is to duplicate
> the .NET framework, which frankly reminds me of what MainSoft tried to do..
> and failed..
> >
> > Scott
> >
> >
> >
> >
> >> -----Original Message-----
> >> From: Pau Garcia i Quiles [mailto:pgquiles at elpauer.org]
> >> Sent: Thursday, March 19, 2009 3:54 AM
> >> To: Scott Aron Bloom
> >> Cc: qt-interest at trolltech.com
> >> Subject: Re: [Qt-interest] C++ + QT vs C#
> >>
> >> Hello,
> >>
> >> How about combining C# and Qt by using the Qt C# bindings (Qyoto) ? :-)
> >>
> >> http://techbase.kde.org/Development/Languages/Qyoto
> >>
> >> A (very nice) application which uses Qyoto:
> >> http://synapse.im/
> >>
> >> 2009/3/19 Scott Aron Bloom <Scott.Bloom at sabgroup.com>:
> >> > Hope all you QT people like my numbers.. I'm pretty proud of them.
> >> >
> >> >
> >> >
> >> > So I've been working on a project for a client, and the previous
> consultant
> >> > (who had to leave the project but Im friends with) is a C# guy... Loves
> C# etc
> >> > etc...  Claims the performance is great and that Im full of $%#@ when I
> say
> >> > Ill stick with C++ when and I need performance...  And even if I don't..
> Ill
> >> > still take C++ J
> >> >
> >> >
> >> >
> >> > In taking over the project, essentially we had to be able to read in a
> tab
> >> > separated file, with a random header, and insert it into a new table,
> using
> >> > the first row as the field names of the database.
> >> >
> >> >
> >> >
> >> > He wrote it in C# and had all but the insert into DB working.. Now.. I
> >> > didn't like his style (he read the whole file in at once and then used a
> >> > string splitter to split the lines...
> >> >
> >> >
> >> >
> >> > Initially its app sat at 450MB to read in the 118k rows due to having the
> >> > whole thing in memory + each line in memory...
> >> >
> >> >
> >> >
> >> > Well we both wrote it to be read 1 line, process 1 line, maybe a bit
> slower...
> >> > but not much..
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >                 C++(Console) C++(GUI)                C#
> >> >
> >> > Memory before loading anything             6MB
> >> > 9MB       22MB
> >> >
> >> > Memory after reading each line
> >> >
> >> > and inserting into DB
> >> > 6MB                       9MB       180MB (love heap managers...)
> >> >
> >> > Memory after show db in GUI
> >> >
> >> > In QT using QSqlQueryModel and
> >> > QAbstractTableModel
> >> > NA                          12MB    450MB
> >> >
> >> >
> >> >
> >> > Runtime to load                with NO DB connection
> >> >
> >> > (release mode)                                 3s
> >> > 3s            9s
> >> >
> >> > Runtime to load with DB inserts
> >> > 210s                       210s       540s
> >> >
> >> > Runtime to show in GUI
> >> > NA                          .5s          3.3s
> >> >
> >> >
> >> >
> >> > Size of data...
> >> >
> >> > ~118k rows of 105 columns of ~50 filled columns.
> >> >
> >> >
> >> >
> >> > BTW.. I cant use BULK IMPORT commands because they are not SQL database
> >> > agnostic.
> >> >
> >> >
> >> >
> >> > Scott
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > Qt-interest mailing list
> >> > Qt-interest at trolltech.com
> >> > http://lists.trolltech.com/mailman/listinfo/qt-interest
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Pau Garcia i Quiles
> >> http://www.elpauer.org
> >> (Due to my workload, I may need 10 days to answer)
> >
> 
> 
> 
> --
> Pau Garcia i Quiles
> http://www.elpauer.org
> (Due to my workload, I may need 10 days to answer)




More information about the Qt-interest-old mailing list