Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

C++ is a complicated language?

47 views
Skip to first unread message

Mr Flibble

unread,
Aug 14, 2016, 11:32:58 AM8/14/16
to
C++ is a complicated language? No shit. Have you only just realized this?

C++ was complicated before C++98 so imagine how complicated it is now.

However, paradoxically, C++'s complexity can result in simpler C++
PROGRAMS which is a GOOD THING (tm).

/Flibble

jacob navia

unread,
Aug 14, 2016, 3:35:13 PM8/14/16
to
Le 14/08/2016 à 17:32, Mr Flibble a écrit :
> C++ is a complicated language? No shit. Have you only just realized this?
>

No, since quite a long time actually.

> C++ was complicated before C++98 so imagine how complicated it is now.
>

I do not need to imagine it. Just look at it.

> However, paradoxically, C++'s complexity can result in simpler C++
> PROGRAMS which is a GOOD THING (tm).
>

Yes, but the problem is brittleness. Without continuous maintenance any
small thing that changes and unrelated code to the point of failure
could go wrong.

Finding the point of failure becomes extremely complex for the unaware
maintenance programmer.

For instance (in another message) you say that

<quote>
My new GUI library "neoGFX" doesn't use signals and slots as signals and
slots are an old solution to an old problem. Instead all we need to do is:

button1.clicked([](){...});

<end quote>

Are you sure? The new syntax does really replace neatly the code for
slots/signals? An object (a button) that sends signals was an analogy
quite easy to follow.

What does the new syntax bring to the code actually? Because apart for
being very small, it looks very unreadable to me.

Of course I am not a C++ head but I would prefer the old slot/signal
framework. It is a proven analogy, many libraries use it, and code
written like that has a KNOWN structure, callbacks, etc. Yours is a new
way of doing the same thing, what can be very clever but for the
maintenance programmer is yet another pain in the ass really.

Sorry but I couldn't resist

:-)



> /Flibble

Mr Flibble

unread,
Aug 14, 2016, 4:10:30 PM8/14/16
to
If you have a problem with C++ lambdas then I am sorry but modern C++ is
simply not your cup of tea so you should try another language.

/Flibble

jacob navia

unread,
Aug 14, 2016, 4:39:20 PM8/14/16
to
Le 14/08/2016 à 22:10, Mr Flibble a écrit :
> If you have a problem with C++ lambdas then I am sorry but modern C++ is
> simply not your cup of tea so you should try another language.

I am just insunuating very perfidiously your honor that the "old"
signal/slot paradigm is a better idea for a windowing system as your
extremely complicated syntax.

It assumes the existence of a button OBJECT that sends signals to
subscribers. This is the base of many windowing systems and is a well
known paradigm.

You did not show any code and I think that the new syntax doesn't bring
anything new or innovative but does the same thing in a more complicated
way.

Specifically I asked what your new syntax brings for the application (in
this case a windowing system).

Please argue man, instead of throwing around completely empty sentences like

<quote>
modern C++ is simply not your cup of tea so you should try another language.
<end quote>

"Modern C++ is like that" you say. As the signal slot paradigm that is
working since years perfectly is suddenly "old" and must be replaced by
"modern" constructs that are smaller, and more complicated to read.

You did NOT answer why this new construct is in any way better than the
"old". The only thing that you said is that is an "old problem". Well
yes, hanging code an events is the essence of event oriented
programming, and that is in use since ages.

And this is a typical case where this fanatism of the "new" and the
piling up of new and newer stuff that nobody follows any more.

I am still waiting for an answer:

WHAT IS THE ADANTAGE of the new syntax in terms of software engineering?

(Besides being more incomprehensible)

Thanks in advance for your explanations.


Mr Flibble

unread,
Aug 14, 2016, 5:01:17 PM8/14/16
to
My solution with lambdas is actually simpler than signals and slots.

I can only repeat my earlier reply: if you find C++ lambdas too
complicated then I suggest you use a different programming language.

/Flibble

David Brown

unread,
Aug 14, 2016, 5:13:56 PM8/14/16
to
On 14/08/16 23:01, Mr Flibble wrote:

> My solution with lambdas is actually simpler than signals and slots.
>
> I can only repeat my earlier reply: if you find C++ lambdas too
> complicated then I suggest you use a different programming language.
>
> /Flibble

It is worth noting that in languages that have had lambdas for longer
than C++, such as Python and Javascript, lambdas are a very popular way
to handle events such as button presses. The don't handle every
possibility, but for a good many common cases they work very well.

So IMHO, using lambdas as the base for event systems in a new gui
framework is a good idea, demonstrated by experience in other frameworks
and other languages.

0 new messages