From: Razvan Cojocaru on
> Given that many other programming languages are easier to learn/use, is
> my passion for C++ a form of madness? No idea why, but I enjoy challenge
> of scope resolution, templates, memory management, and all the other
> things that cause newcomers to C++ such confusion.

I couldn't give you a relevant answer, since I don't know you
personally. There are a few potential explanations, some of them
flattering and some of them not so flattering :). I'll be a good netizen
and skip to the flattering ones: it's possible that you've got a high IQ
and get easily bored with simpler languages, or you've considered the
other languages and found that C++ covers pretty much everything.

C++'s template metaprogramming makes Lisp easy to learn, C++'s OO
support makes Java easy to learn, C++ plain C support makes similar
programming languages (is Pascal still alive?) easy to learn, and so on.
Unless you're a trendy postmodern programmer and need to be at the
bleeding edge with the latest buzzword-filled academia-only programming
language designs, if you make the effort and really master C++, it's all
downhill from there if you need to learn any other real-world
programming language.

C++ is also an ISO standard and not owned by any one company, which
makes it a safer investment in your professional future. Nobody can kill
it, like Microsoft did with Visual Basic. If Microsoft shuts down all
Visual Studio development tomorrow, you'll still have GCC, Comeau,
Intel, and a bunch of other compilers.

How old are you? :)


--
Razvan Cojocaru
KeyID: 0x04CA34DE


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: Andre Kaufmann on
DeMarcus wrote:
> On 2010-05-14 01:39, Andre Kaufmann wrote:
> [...]
>> C++ has very good (standard) libraries, like the STL.
>> But regarding graphics / GUI the standard support could be much better,
>> compared to other languages.
>>
>
> I totally agree.
>
> I would love to see, even help if I can, a modern GUI API for C++. It
> should probably not be in the standard, but in the standard's sibling;
> Boost.

Yes, definitively it should be either in Boost or in a separated
standard - and only in long term it should be integrated in C++0x.
GUI technology evolves IMHO too fast (e.g. Touch API/Animation etc.) for
the C++ to be able to keep up with that innovation speed.

> I know there are several GUI libraries out there, with Qt being one of
> the better, but I'm just very reluctant to having a company owning the API.

Agreed, Qt is great but unfortunately not a standard and owned by a
single company.

> My idea is that with all years of experience, plus C++0x, a new GUI API
> could be very clean and intuitive. It's also important to emphasize that
> Boost does not need to provide any implementation; just the API. Then
> several different vendors could profit on selling full implementations,
> as long as I can swap out one implementation for another just changing a
> library file.

Vendors could also profit delivering a very good RAD environment / editor.

> Does my idea make sense?

I think it makes sense.
The argument against a C++ GUI standard commonly is that the GUI
technologies differ too much to define a standard or the other way round
a C++ GUI standard would reflect only a basic GUI, which wouldn't make
much sense to use for large GUI applications.

It surely doesn't make sense to have a Mac application which looks like
a Windows one, or a Linux KDE application which looks like a Mac
application.

But I think it's possible. Qt is a good example and if a good vector
based render engine is used (something like Cairo) a very good OO-GUI
framework could be built, which will be platform and resolution
independent and should adopt the GUI style of each OS.
And as you wrote, the internals shouldn't be standardized. E.g. only the
behavior and API should be defined. E.g. a Button class should have
standardized OnClick callbacks, width, height etc., but it shouldn't be
defined how that button looks like.

But it's not a simple task and quite different than implementing a "new
boost library". It would be a "single huge new library" and much, much work.

Andre


--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: Öö Tiib on
On May 13, 1:21 am, cpp4ever <n2xssvv.g02gfr12...(a)ntlworld.com> wrote:
> Given that many other programming languages are easier to learn/use, is
> my passion for C++ a form of madness?

Maybe. It depends on lot of things. (I compare with PHP):

* How well you get your family feed (or chicks attracted)? I feel C++
devs are slightly better paid in average.

* How well you enjoy the work you do? C++ work is usually more
challenging and complex. Requirements for skill and experience are
higher and one must be eager to learn new tricks all the time.

* How well you enjoy your coworkers? C++ teams usually consist of
more extreme personalities. Some people like it, some dislike.

> No idea why, but I enjoy challenge of scope resolution, templates,
> memory management, and all the other things that cause newcomers
> to C++ such confusion.

For you challenge and complexity is a plus. So think about other
dimensions. Do you get rewarded enough and do you like your team
members? If yes and yes, then nope, you are smart not mad. ;)


--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: cpp4ever on
On 05/17/2010 12:53 AM, Razvan Cojocaru wrote:
>> Given that many other programming languages are easier to learn/use, is
>> my passion for C++ a form of madness? No idea why, but I enjoy challenge
>> of scope resolution, templates, memory management, and all the other
>> things that cause newcomers to C++ such confusion.
>
> I couldn't give you a relevant answer, since I don't know you
> personally. There are a few potential explanations, some of them
> flattering and some of them not so flattering :). I'll be a good netizen
> and skip to the flattering ones: it's possible that you've got a high IQ
> and get easily bored with simpler languages, or you've considered the
> other languages and found that C++ covers pretty much everything.
>
> C++'s template metaprogramming makes Lisp easy to learn, C++'s OO
> support makes Java easy to learn, C++ plain C support makes similar
> programming languages (is Pascal still alive?) easy to learn, and so on.
> Unless you're a trendy postmodern programmer and need to be at the
> bleeding edge with the latest buzzword-filled academia-only programming
> language designs, if you make the effort and really master C++, it's all
> downhill from there if you need to learn any other real-world
> programming language.
>
> C++ is also an ISO standard and not owned by any one company, which
> makes it a safer investment in your professional future. Nobody can kill
> it, like Microsoft did with Visual Basic. If Microsoft shuts down all
> Visual Studio development tomorrow, you'll still have GCC, Comeau,
> Intel, and a bunch of other compilers.
>
> How old are you? :)
>
>

Not sure about the high IQ bit, but IQ is a measure of a fairly
specific type of pattern recognition, so I'm not overly impressed by
high IQ scores. As for C++ being a useful skill, I find that most
vacancies require experience with boost, oracle, or other libraries, and
not just STL. Then, many of them require good academic results, and or
specific experience, although I've never been convinced that is any
guarantee of a good C++ developer, or the code they've developed or
develop be easy to maintain or develop. As I don't meet the previous 2
criteria, getting an opportunity to use any C++ skills I may have is not
easy. So those C++ skills have hardly flattered my career development.

Enough of my moaning, it's good to know other folks have responded to
the original post. Plenty of interesting observations about C++ have
arisen, and you're comment about other programming languages being
easier to learn if you're coming from C++ is certainly true based on my
experience.

One area that frequently seems to be ignored is code documentation,
which also ties in with Quality Assurance procedures, but in my
experience this is mostly shoddy at best. Surely, given the potential
difficulty of understanding C++ code this should receive more attention
than it often does. Personally, for my own projects I use DOxygen with
the associate code comments to create documentation. This helps to
understand the code during development, and especially if you, or others
ever need to do more development at a later date.

The other area that seems to be ignored is scope, which surprises me
as with objects going and out of scope, the relevant constructors and
destructors are called. This is implied code that any good C++ developer
will be aware of, but can still be a potential cause of nasty bugs.
Especially if the code has interdependencies between existing objects,
although I always try to encapsulate these within another object.

Finally I came across an instance where folks had developed code where
a member function would delete *this object, (delete this;). IMHO this
is appalling and have never done it myself. So, can anyone justify doing
this, as it is a potential time bomb for future development.

As for my age, well I finished my degree 20+ years ago should point
you in the general direction of my age.

Regards

JB :)

--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: James Kanze on
On May 12, 11:21 pm, cpp4ever <n2xssvv.g02gfr12...(a)ntlworld.com>
wrote:
> Given that many other programming languages are easier to learn/use,

Are they? Many other programming languages are easier to learn
and use for simple applications, but I've yet to find one as
easy to use for large scale applications. (Possibly Ada 95, but
I've not had the occasion to give it a real try.)

--
James Kanze

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]