Re: this girl calls c ugly

Liste des GroupesRevenir à cl c  
Sujet : Re: this girl calls c ugly
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.c
Date : 29. May 2026, 08:52:44
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <10vbgkc$3uus7$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : Mozilla Thunderbird
On 2026-05-28 11:57, BGB wrote:
On 5/28/2026 2:18 AM, Janis Papanagnou wrote:
On 2026-05-28 01:49, BGB wrote:
[...]
I'm a big fan of abstractions. - So many things beyond "C" are fine!
 I am not saying that abstractions are bad, but I haven't usually found them to be worth the costs IME.
Wow! - That's completely different from my experience and practice.
It's what makes usage simple, fast, reliable. Not wasting time for
details, or fixing technical bugs that should be prevented by the
language.

 
[...]
>
Similar reason to why one doesn't build complex patterns or do template- like stuff via function macros in the C preprocessor:
One can do this... But again, bloated binaries and terrible build times.
>
Code patterns that are bulky in "C" can be formulated tersely with
C++/STL (while still preserving an efficient implementation, even with
complexities guaranteed); and the framework is flexible, orthogonally
designed. Easy to reuse high-level concepts as opposed to re-implement
the same code for different types. Or weaken the code by extensive use
of casts. All sorts of C's problems with memory can be addressed. (The
list can be continued; but I wonder why such things aren't recognized.)
 Both have a similar issue when used in a naive way though:
   Non-careful use of either results in code bloat.
Okay, "when used in a in a naive way". - Let's leave it at that,
then.

 But, not really an "easy" way to avoid bloat, other than to write code specifically for what cases are relevant; while also avoiding needless duplication and copy paste (where, overuse of copy/paste can also lead to bloat; along with turning the code into an ugly mess).
Hmm.. - as said, the during very early days there were issues; I
recall on one platform duplication of template code in more that
one source unit. And/or some environmental hacks (of the compiler)
to deposit template code for linking. In the later days I've not
seen such immature things anymore.

 But, OTOH, factoring things into too small of pieces can negatively effect performance (and, for non-leaf functions, prolog/epilog costs for too many tiny functions can also be a source of code bloat).
 As can be noted, trying to mimic templates via creative use of C preprocessor macros can also easily result in excessive bloat...
 
>
So, one is back to the core issue:
The part that is actually usable, mostly still amounts to syntactic sugar over things you can already do in C.
>
Huh? It may depend on the developer/programmer. But it's certainly a
lot more than "syntactic sugar".
 Well, for example:
   Operator overloading:
     Basically glorified function calls made to resemble operators;
   Classes:
     Can be done with structs, and implementing vtables manually.
 Implementing class hierarchies via structs can be done, but gets ugly (GTK's GObject system sorta went this way).
We obviously disagree completely in what's "syntactic sugar".
(With that reasoning all ("C" or other languages') features are
"syntactic sugar" because you can do that also with assembly?)

>
There are "niceties", granted, but relatively little "actually new".
>
Not all concepts are "new", of course; we saw them in other languages
years or (in some cases) decades ago. But C++' and STL features are a
lot more than just niceties; it's beyond me how one may come to such
a valuation. (And now let's compare that formulated demand or wish of
new things with "C"?)
 Well, it is a thing that can be done, but is a double-edged sword.
Saves code one might have to write out manually.
But, is very easy to result in things that negatively effect build times.
A simple, less-abstracted language can certainly be easier (thus
faster) translated to machine code.
I don't know about your working contexts. In our contexts slightly
larger built-times were no issue. For one, we built using makefiles,
and only full builds (to create QA test images, or public releases)
required much time; they typically ran over night; our systems were
typically very large!
Build times were also influenced by other more significant factors.
Mundane sounding things like ordering of functions in libraries and
some such. (Though nothing that wouldn't have been possible to be
addressed by the build-management group.)

 Usual strategy is to try to limit how much code is written, and also to avoid doing things in ways that result in too much code, or too much cruft.
 Best to avoid both copy paste when reasonable, and sticking anything non-trivial in macros.
We avoided macros if possible.

 
And, one of the rare few "actually new" features C++ offers: exceptions.
>
We used them already in the 1990's.
 Here, "new" in the sense that it can't be mapped directly back to stuff that can already be expressed natively in C.
Okay.

 
Also comes with its own drawbacks (code bloat, try/catch+throw is usually slow, use with care else program explodes, ...). [...]
>
I cannot confirm your statements, especially in that generality.
>
I recall we had bloat with templates on a specific platform in the
very early pre-standard era, when they were first supported. But we
didn't have any [noteworthy] speed degradation with exceptions (or
templates).
 The relative impact of try/catch is more modest.
Aha; I thought that this would have been the source of criticism.

 Typically, it results in every function having an unwind-handling stub for, in-case an exception is thrown, it can call any destructors or similar.
I've seen and heard of may ways in which exceptions have been used,
ranging from a single "catch all" in the main() function, to each
function instrumented. I will not judge about these extreme cases.
All I say is that you, as a software designer, have the options to
sensibly structure and instrument your code with exceptions.
There's also the characteristic that you may define exception types
(or use just existing ones); build or add to a hierarchy to handle
them flexibly, provide context data with the exception objects, etc.
Handling all that manually and explicitly, without the support of an
exception concept I'd certainly not prefer.
Janis

[...]

Date Sujet#  Auteur
27 May 26 * this girl calls c ugly363fir
27 May 26 `* Re: this girl calls c ugly362fir
28 May 26  `* Re: this girl calls c ugly361BGB
28 May 26   +* Re: this girl calls c ugly5Lawrence D’Oliveiro
28 May 26   i+* Re: this girl calls c ugly3BGB
29 May 26   ii`* Re: this girl calls c ugly2Lawrence D’Oliveiro
29 May 26   ii `- Re: this girl calls c ugly1BGB
28 May 26   i`- Re: this girl calls c ugly1Bonita Montero
28 May 26   +* Re: this girl calls c ugly19Janis Papanagnou
28 May 26   i+* Re: this girl calls c ugly15BGB
29 May 26   ii+- Re: this girl calls c ugly1Lawrence D’Oliveiro
29 May 26   ii`* Re: this girl calls c ugly13Janis Papanagnou
29 May 26   ii `* Re: this girl calls c ugly12BGB
29 May 26   ii  +* Re: this girl calls c ugly9David Brown
29 May 26   ii  i`* Re: this girl calls c ugly8BGB
30 May 26   ii  i `* Re: this girl calls c ugly7David Brown
30 May 26   ii  i  +* Re: this girl calls c ugly2Janis Papanagnou
30 May 26   ii  i  i`- Re: this girl calls c ugly1David Brown
30 May 26   ii  i  `* Re: this girl calls c ugly4BGB
31 May 26   ii  i   `* Re: this girl calls c ugly3David Brown
31 May 26   ii  i    `* Re: this girl calls c ugly2BGB
31 May 26   ii  i     `- Re: this girl calls c ugly1David Brown
29 May 26   ii  +- Re: this girl calls c ugly1Janis Papanagnou
30 May 26   ii  `- Re: this girl calls c ugly1Lawrence D’Oliveiro
28 May 26   i`* Re: this girl calls c ugly3Chris M. Thomasson
29 May 26   i `* Re: this girl calls c ugly2Janis Papanagnou
29 May 26   i  `- Re: this girl calls c ugly1Chris M. Thomasson
28 May 26   `* Re: this girl calls c ugly336fir
28 May 26    `* Re: this girl calls c ugly335BGB
29 May 26     +* Re: this girl calls c ugly328Lawrence D’Oliveiro
29 May 26     i`* Re: this girl calls c ugly327Janis Papanagnou
29 May 26     i `* Re: this girl calls c ugly326Bart
29 May 26     i  +* Re: this girl calls c ugly310Janis Papanagnou
29 May 26     i  i`* Re: this girl calls c ugly309Bart
29 May 26     i  i +* Re: this girl calls c ugly9Janis Papanagnou
29 May 26     i  i i+* Re: this girl calls c ugly2Bart
29 May 26     i  i ii`- Re: this girl calls c ugly1Janis Papanagnou
29 May 26     i  i i`* Re: this girl calls c ugly6Bart
29 May 26     i  i i +* Re: this girl calls c ugly4Janis Papanagnou
29 May 26     i  i i i`* Re: this girl calls c ugly3Bart
29 May 26     i  i i i `* Re: this girl calls c ugly2Janis Papanagnou
29 May 26     i  i i i  `- Re: this girl calls c ugly1Bart
29 May 26     i  i i `- Re: this girl calls c ugly1Keith Thompson
29 May 26     i  i `* Re: this girl calls c ugly299tTh
29 May 26     i  i  `* Re: this girl calls c ugly298Bart
29 May 26     i  i   +* Re: this girl calls c ugly296Keith Thompson
29 May 26     i  i   i`* Re: this girl calls c ugly295Bart
29 May 26     i  i   i +- Re: this girl calls c ugly1Janis Papanagnou
29 May 26     i  i   i `* Re: this girl calls c ugly293Keith Thompson
29 May 26     i  i   i  `* Re: this girl calls c ugly292Bart
29 May 26     i  i   i   +* Re: this girl calls c ugly5Keith Thompson
30 May 26     i  i   i   i`* Re: this girl calls c ugly4James Kuyper
30 May 26     i  i   i   i `* Re: this girl calls c ugly3Bart
30 May 26     i  i   i   i  `* Re: this girl calls c ugly2Keith Thompson
30 May 26     i  i   i   i   `- Re: this girl calls c ugly1Bart
30 May 26     i  i   i   `* Re: this girl calls c ugly286Dan Cross
30 May 26     i  i   i    +* Re: this girl calls c ugly282Bart
31 May 26     i  i   i    i+* Re: this girl calls c ugly280Keith Thompson
31 May 26     i  i   i    ii+* Re: this girl calls c ugly5Janis Papanagnou
31 May 26     i  i   i    iii+* Re: this girl calls c ugly2Keith Thompson
2 Jun 26     i  i   i    iiii`- Re: this girl calls c ugly1Janis Papanagnou
31 May 26     i  i   i    iii`* Re: this girl calls c ugly2David Brown
2 Jun 26     i  i   i    iii `- Re: this girl calls c ugly1Janis Papanagnou
31 May 26     i  i   i    ii`* Re: this girl calls c ugly274Richard Harnden
31 May 26     i  i   i    ii +* Re: this girl calls c ugly169David Brown
31 May 26     i  i   i    ii i+* Re: this girl calls c ugly166Bart
31 May 26     i  i   i    ii ii+* Re: this girl calls c ugly140David Brown
31 May 26     i  i   i    ii iii`* Re: this girl calls c ugly139James Kuyper
31 May 26     i  i   i    ii iii `* Re: this girl calls c ugly138David Brown
31 May 26     i  i   i    ii iii  +* Re: this girl calls c ugly4James Kuyper
31 May 26     i  i   i    ii iii  i`* Re: this girl calls c ugly3David Brown
31 May 26     i  i   i    ii iii  i `* Re: this girl calls c ugly2James Kuyper
1 Jun 26     i  i   i    ii iii  i  `- Re: this girl calls c ugly1David Brown
31 May 26     i  i   i    ii iii  `* Re: this girl calls c ugly133Keith Thompson
1 Jun 26     i  i   i    ii iii   +* Re: this girl calls c ugly2David Brown
1 Jun 26     i  i   i    ii iii   i`- Re: this girl calls c ugly1Keith Thompson
2 Jun 26     i  i   i    ii iii   +* Re: this girl calls c ugly129Janis Papanagnou
2 Jun 26     i  i   i    ii iii   i+- Re: this girl calls c ugly1James Kuyper
2 Jun 26     i  i   i    ii iii   i+* Constants and undefined behavior82Tim Rentsch
2 Jun 26     i  i   i    ii iii   ii`* Re: Constants and undefined behavior81Dan Cross
4 Jun 26     i  i   i    ii iii   ii `* Re: Constants and undefined behavior80Tim Rentsch
4 Jun 26     i  i   i    ii iii   ii  `* Re: Constants and undefined behavior79Dan Cross
4 Jun 26     i  i   i    ii iii   ii   +* Re: Constants and undefined behavior31Keith Thompson
5 Jun 26     i  i   i    ii iii   ii   i+* Re: Constants and undefined behavior28Dan Cross
5 Jun 26     i  i   i    ii iii   ii   ii+* Re: Constants and undefined behavior24Keith Thompson
6 Jun 26     i  i   i    ii iii   ii   iii+* Re: Constants and undefined behavior19Dan Cross
6 Jun 26     i  i   i    ii iii   ii   iiii`* Re: Constants and undefined behavior18Keith Thompson
8 Jun 26     i  i   i    ii iii   ii   iiii `* Re: Constants and undefined behavior17Dan Cross
8 Jun 26     i  i   i    ii iii   ii   iiii  +* Re: Constants and undefined behavior5Keith Thompson
9 Jun 26     i  i   i    ii iii   ii   iiii  i`* Re: Constants and undefined behavior4Dan Cross
9 Jun 26     i  i   i    ii iii   ii   iiii  i `* Re: Constants and undefined behavior3Keith Thompson
9 Jun10:46     i  i   i    ii iii   ii   iiii  i  `* Re: Constants and undefined behavior2Dan Cross
9 Jun23:07     i  i   i    ii iii   ii   iiii  i   `- Re: Constants and undefined behavior1Keith Thompson
9 Jun 26     i  i   i    ii iii   ii   iiii  `* Re: Constants and undefined behavior11Waldek Hebisch
9 Jun23:29     i  i   i    ii iii   ii   iiii   +* Re: Constants and undefined behavior3James Kuyper
10 Jun00:01     i  i   i    ii iii   ii   iiii   i`* Re: Constants and undefined behavior2Keith Thompson
10 Jun13:36     i  i   i    ii iii   ii   iiii   i `- Re: Constants and undefined behavior1Dan Cross
11 Jun15:49     i  i   i    ii iii   ii   iiii   `* Re: Constants and undefined behavior7Janis Papanagnou
11 Jun16:20     i  i   i    ii iii   ii   iiii    +* Re: Constants and undefined behavior2Dan Cross
11 Jun17:08     i  i   i    ii iii   ii   iiii    i`- Re: Constants and undefined behavior1Janis Papanagnou
11 Jun17:30     i  i   i    ii iii   ii   iiii    `* Re: Constants and undefined behavior4Waldek Hebisch
6 Jun 26     i  i   i    ii iii   ii   iii`* Re: Constants and undefined behavior4Tim Rentsch
5 Jun 26     i  i   i    ii iii   ii   ii`* Re: Constants and undefined behavior3Janis Papanagnou
7 Jun 26     i  i   i    ii iii   ii   i`* Re: Constants and undefined behavior2Tim Rentsch
9 Jun07:05     i  i   i    ii iii   ii   `* Re: Constants and undefined behavior47Tim Rentsch
2 Jun 26     i  i   i    ii iii   i`* Re: this girl calls c ugly45Keith Thompson
2 Jun 26     i  i   i    ii iii   `- Re: this girl calls c ugly1Chris M. Thomasson
2 Jun 26     i  i   i    ii ii`* Re: this girl calls c ugly25Dan Cross
31 May 26     i  i   i    ii i`* Re: this girl calls c ugly2James Kuyper
31 May 26     i  i   i    ii +* Re: this girl calls c ugly2Keith Thompson
31 May 26     i  i   i    ii `* Re: this girl calls c ugly102Tim Rentsch
31 May 26     i  i   i    i`- Re: this girl calls c ugly1Dan Cross
1 Jun 26     i  i   i    `* Re: this girl calls c ugly3Tim Rentsch
30 May 26     i  i   `- Re: this girl calls c ugly1David Brown
29 May 26     i  +* Re: this girl calls c ugly6Janis Papanagnou
30 May 26     i  `* Re: this girl calls c ugly9Lawrence D’Oliveiro
29 May 26     `* Re: this girl calls c ugly6Bonita Montero

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal