comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Top 10 Worst C# Features
Date: Thu, 3 Sep 2015 14:12:12 -0500
Date: 2015-09-03T14:12:12-05:00	[thread overview]
Message-ID: <msa62d$74p$1@loke.gir.dk> (raw)
In-Reply-To: ms9cm8$leh$1@dont-email.me

"G.B." <bauhaus@futureapps.invalid> wrote in message 
news:ms9cm8$leh$1@dont-email.me...
...
> AFAICT, today we have string literals identifying things
> that can be called (Gtk), or we have selectors (Objective-C)
> for a similar thing, etc.  A mouse click or gesture is thus
> another kind of event to which programmers might want to attach
> something that reacts. How would static type systems help,
> knowing that trying to make them help has allegedly failed
> in the past?

I have no idea why you think this is a problem. Claw uses statically defined 
action routines that one overrides. This is type-safe, it's impossible to 
handle an action that cannot happen (such as a click on a drawing canvas), 
and one can easily see that all required actions are handled (they're 
abstract in that case).

GWindows uses (optionally) call-back access-to-subprograns, which definitely 
have the first two properties (but not the third).

The implementation of this (the actual GUI binding) is groddy, but that's 
because we're trying to build something clean on top of a C implementation 
that resists that at every step. :-)

So I fail to see any problem that isn't being addressed here. Finalization 
is a very special kettle of fish, because the objects don't exist 
afterwards. It's needed to provide last wishes to objects, for clean-up of 
various sorts. (For instance, Claw uses finalization to unhook windows from 
the active window list, else we'd be calling actions on non-existent 
windows. There is no other bullet-proof way to do that, if one wants there 
library to work in the face of exceptions and abort, as well as programmer 
mistakes [failing to call Close appropriately].)

                                    Randy.


  parent reply	other threads:[~2015-09-03 19:12 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-02 10:59 Top 10 Worst C# Features Stefan.Lucks
2015-09-02 17:37 ` Álex R. Mosteo
2015-09-02 19:39 ` Randy Brukardt
2015-09-03  8:14   ` Georg Bauhaus
2015-09-03  9:26     ` Dmitry A. Kazakov
2015-09-03 11:39       ` G.B.
2015-09-03 12:00         ` G.B.
2015-09-03 13:59           ` Dmitry A. Kazakov
2015-09-03 19:12           ` Randy Brukardt [this message]
2015-09-04  7:33             ` Georg Bauhaus
2015-09-04 21:34               ` Randy Brukardt
2015-09-05  6:31                 ` Dmitry A. Kazakov
2015-09-05  6:44                 ` Georg Bauhaus
2015-09-05  7:07                   ` Dmitry A. Kazakov
2015-09-05  6:45                 ` Niklas Holsti
2015-09-05  7:21                   ` Dmitry A. Kazakov
2015-09-05 12:07                   ` Peter Chapin
2015-09-06 10:45                   ` Georg Bauhaus
2015-10-13 19:57                   ` Eryndlia Mavourneen
2015-09-05  7:16                 ` Shark8
2015-09-03 13:47         ` Dmitry A. Kazakov
2015-09-03  8:51 ` gautier_niouzes
2015-10-01 14:03 ` Paul Colin de Gloucester
2015-10-14  8:00   ` Maciej Sobczak
2015-10-14 14:26     ` Ben Bacarisse
2015-10-14 16:50       ` Paul Rubin
2015-10-14 18:17         ` Stefan.Lucks
2015-10-14 19:54           ` Ben Bacarisse
2015-10-15 12:24       ` Maciej Sobczak
2015-10-15 13:59         ` Ben Bacarisse
2015-11-06 14:50     ` Nicholas Collin Paul de Gloucester
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox