Re: relearning C: why does an in-place change to a char* segfault?

Liste des GroupesRevenir à cl c  
Sujet : Re: relearning C: why does an in-place change to a char* segfault?
De : nntp (at) *nospam* fulltermprivacy.com (Phillip Frabott)
Groupes : comp.lang.c
Date : 28. Sep 2024, 18:57:56
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vd9g34$1bmsp$1@dont-email.me>
References : 1
User-Agent : NewsLeecher v7.0 Final (http://www.newsleecher.com)
In reply to "Janis Papanagnou" who wrote the following:

On 28.09.2024 05:34, Keith Thompson wrote:
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
The more C is changed to resemble C++ the worse it becomes.  It
isn't surprising that you like it.
 
For context, since the parent article is from a month and a half
ago, I was discussing a proposal to change a future C standard to
refer to "constants" as "literals".  I mentioned that I think it's
a good idea.
 
I've heard of and seen various forms to name such entities...
- in a Pascal and an Eiffel book I find all these named "constants"
- in an Algol 68 book I read about "standard designations"
- in a book about languages and programming in general I find
    "literals" ("abc"), "numerals" (42), "word-symbols" (false),
    "graphemes" (�), etc., differentiated
- I've also have heard about "standard representations [for the
    values of a respective type]"; also a type-independent term
 
I also think (for various reasons) that "constants" is not a good
term. (Personally I like terms like the Algol 68 term, that seems
to "operate" on another [more conceptual] abstraction level.)
 
But you'll certainly have to expect a lot of anger if the terminology
of some standards documents get changed from one version to another.
 
Janis


The only gripe I would have if we synonymized constants and literals is that not
every const is initialized with a literal. There have been times where I have
initialized a const from the value of a variable. I don't think that const and
literals are the same thing because of this.

To me a const is permanently set at initialization. That being runtime while a
literal is a hardcoded value that gets set at compile time.

There are cases where it does in fact matter, especially when a const is not
initialized with a literal but a var. It can also make a bigger difference when
someone actually needs to know when something is being set at compile time and
when it is being set at runtime. It can have a huge impact especially in edge
cases.

But thats just my 2 cents in the mix.

Have a good one!

Phillip Frabott
{Adam: Is a void really a void if it returns? - Jack: No, it's just nullspace at
that point.}
Phillip Frabott
{Adam: Is a void really a void if it returns? - Jack: No, it's just nullspace at
that point.}


--
----------------------------------------- --- -- -
Posted with NewsLeecher v7.0 Final
Free Newsreader @ http://www.newsleecher.com/
------------------------------- ----- ---- -- -


Date Sujet#  Auteur
1 Aug 24 * relearning C: why does an in-place change to a char* segfault?105Mark Summerfield
1 Aug 24 +* Re: relearning C: why does an in-place change to a char* segfault?2Mark Summerfield
1 Aug 24 i`- Re: relearning C: why does an in-place change to a char* segfault?1Ben Bacarisse
1 Aug 24 +* Re: relearning C: why does an in-place change to a char* segfault?40Richard Harnden
1 Aug 24 i+- Re: relearning C: why does an in-place change to a char* segfault?1Mark Summerfield
1 Aug 24 i`* Re: relearning C: why does an in-place change to a char* segfault?38Bart
1 Aug 24 i `* Re: relearning C: why does an in-place change to a char* segfault?37Keith Thompson
1 Aug 24 i  +* Re: relearning C: why does an in-place change to a char* segfault?27Bart
1 Aug 24 i  i+- Re: relearning C: why does an in-place change to a char* segfault?1Keith Thompson
2 Aug 24 i  i+- Re: relearning C: why does an in-place change to a char* segfault?1James Kuyper
2 Aug 24 i  i+* Re: relearning C: why does an in-place change to a char* segfault?23Kaz Kylheku
2 Aug 24 i  ii`* Re: relearning C: why does an in-place change to a char* segfault?22Bart
2 Aug 24 i  ii +- Re: relearning C: why does an in-place change to a char* segfault?1Richard Damon
2 Aug 24 i  ii `* Re: relearning C: why does an in-place change to a char* segfault?20James Kuyper
2 Aug 24 i  ii  +- Re: relearning C: why does an in-place change to a char* segfault?1Bart
3 Aug 24 i  ii  +* Re: relearning C: why does an in-place change to a char* segfault?5Lawrence D'Oliveiro
3 Aug 24 i  ii  i`* Re: relearning C: why does an in-place change to a char* segfault?4Richard Damon
3 Aug 24 i  ii  i +- Re: relearning C: why does an in-place change to a char* segfault?1Joe Pfeiffer
4 Aug 24 i  ii  i +- Re: relearning C: why does an in-place change to a char* segfault?1Lawrence D'Oliveiro
12 Aug 24 i  ii  i `- Re: relearning C: why does an in-place change to a char* segfault?1Tim Rentsch
14 Aug 24 i  ii  `* Re: relearning C: why does an in-place change to a char* segfault?13Tim Rentsch
14 Aug 24 i  ii   +* Re: relearning C: why does an in-place change to a char* segfault?10Keith Thompson
16 Aug 24 i  ii   i`* Re: relearning C: why does an in-place change to a char* segfault?9Tim Rentsch
16 Aug 24 i  ii   i `* Re: relearning C: why does an in-place change to a char* segfault?8Keith Thompson
28 Sep 24 i  ii   i  `* Re: relearning C: why does an in-place change to a char* segfault?7Tim Rentsch
28 Sep 24 i  ii   i   `* Re: relearning C: why does an in-place change to a char* segfault?6Keith Thompson
28 Sep 24 i  ii   i    `* Re: relearning C: why does an in-place change to a char* segfault?5Janis Papanagnou
28 Sep 24 i  ii   i     `* Re: relearning C: why does an in-place change to a char* segfault?4Phillip Frabott
28 Sep 24 i  ii   i      `* Re: relearning C: why does an in-place change to a char* segfault?3Keith Thompson
29 Sep 24 i  ii   i       `* Re: relearning C: why does an in-place change to a char* segfault?2Phillip Frabott
29 Sep 24 i  ii   i        `- Re: relearning C: why does an in-place change to a char* segfault?1Keith Thompson
14 Aug 24 i  ii   `* Re: relearning C: why does an in-place change to a char* segfault?2James Kuyper
16 Aug 24 i  ii    `- Re: relearning C: why does an in-place change to a char* segfault?1Tim Rentsch
4 Aug 24 i  i`- Re: relearning C: why does an in-place change to a char* segfault?1Bonita Montero
12 Aug 24 i  `* Re: relearning C: why does an in-place change to a char* segfault?9Tim Rentsch
13 Aug 24 i   `* Re: relearning C: why does an in-place change to a char* segfault?8Vir Campestris
13 Aug 24 i    +* Re: relearning C: why does an in-place change to a char* segfault?3Keith Thompson
14 Aug 24 i    i+- Re: relearning C: why does an in-place change to a char* segfault?1Tim Rentsch
14 Aug 24 i    i`- Re: relearning C: why does an in-place change to a char* segfault?1David Brown
14 Aug 24 i    `* Re: relearning C: why does an in-place change to a char* segfault?4Tim Rentsch
14 Aug 24 i     `* Re: relearning C: why does an in-place change to a char* segfault?3Keith Thompson
14 Aug 24 i      `* Re: relearning C: why does an in-place change to a char* segfault?2Kaz Kylheku
14 Aug 24 i       `- Re: relearning C: why does an in-place change to a char* segfault?1Keith Thompson
1 Aug 24 +* No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?38Michael S
1 Aug 24 i`* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?37David Brown
2 Aug 24 i `* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?36candycanearter07
2 Aug 24 i  +* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?34Keith Thompson
2 Aug 24 i  i+* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?28Richard Harnden
2 Aug 24 i  ii+- Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?1James Kuyper
2 Aug 24 i  ii+* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?24Keith Thompson
2 Aug 24 i  iii+* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?5Richard Damon
2 Aug 24 i  iiii+* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?3James Kuyper
2 Aug 24 i  iiiii`* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?2Richard Damon
12 Aug 24 i  iiiii `- Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?1Tim Rentsch
12 Aug 24 i  iiii`- Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?1Tim Rentsch
2 Aug 24 i  iii+* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?15Chris M. Thomasson
3 Aug 24 i  iiii`* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?14Ben Bacarisse
3 Aug 24 i  iiii `* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?13Chris M. Thomasson
5 Aug 24 i  iiii  `* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?12Ben Bacarisse
5 Aug 24 i  iiii   `* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?11Chris M. Thomasson
5 Aug 24 i  iiii    +- Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?1Chris M. Thomasson
5 Aug 24 i  iiii    `* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?9Ben Bacarisse
5 Aug 24 i  iiii     `* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?8Chris M. Thomasson
5 Aug 24 i  iiii      `* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?7Ben Bacarisse
6 Aug 24 i  iiii       +* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?5Chris M. Thomasson
6 Aug 24 i  iiii       i`* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?4Ben Bacarisse
6 Aug 24 i  iiii       i `* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?3Chris M. Thomasson
7 Aug 24 i  iiii       i  `* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?2Ben Bacarisse
13 Aug 24 i  iiii       i   `- Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?1Chris M. Thomasson
6 Aug 24 i  iiii       `- Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?1Chris M. Thomasson
12 Aug 24 i  iii`* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?3Tim Rentsch
12 Aug 24 i  iii `* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?2Keith Thompson
3 Sep 24 i  iii  `- Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?1Tim Rentsch
25 Aug 24 i  ii`* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?2dave thompson 2
25 Aug 24 i  ii `- Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?1Keith Thompson
12 Aug 24 i  i`* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?5Tim Rentsch
12 Aug 24 i  i `* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?4Keith Thompson
13 Aug 24 i  i  `* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?3Tim Rentsch
13 Aug 24 i  i   `* Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?2David Brown
13 Aug 24 i  i    `- Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?1Keith Thompson
3 Aug 24 i  `- Re: No warning at implicit removal of const. Was: relearning C: why does an in-place change to a char* segfault?1David Brown
1 Aug 24 +- Re: relearning C: why does an in-place change to a char* segfault?1James Kuyper
1 Aug 24 `* Re: relearning C: why does an in-place change to a char* segfault?23Kaz Kylheku
1 Aug 24  +* Re: relearning C: why does an in-place change to a char* segfault?20Bart
1 Aug 24  i+- Re: relearning C: why does an in-place change to a char* segfault?1Keith Thompson
1 Aug 24  i+- Re: relearning C: why does an in-place change to a char* segfault?1Ben Bacarisse
2 Aug 24  i+* Re: relearning C: why does an in-place change to a char* segfault?3Kaz Kylheku
2 Aug 24  ii+- Re: relearning C: why does an in-place change to a char* segfault?1Bart
12 Aug 24  ii`- Re: relearning C: why does an in-place change to a char* segfault?1Tim Rentsch
3 Aug 24  i`* Re: relearning C: why does an in-place change to a char* segfault?14David Brown
4 Aug 24  i +* Re: relearning C: why does an in-place change to a char* segfault?12Keith Thompson
4 Aug 24  i i+* Re: relearning C: why does an in-place change to a char* segfault?10Lawrence D'Oliveiro
4 Aug 24  i ii`* Re: relearning C: why does an in-place change to a char* segfault?9Keith Thompson
4 Aug 24  i ii +* Re: relearning C: why does an in-place change to a char* segfault?2Richard Damon
12 Aug 24  i ii i`- Re: relearning C: why does an in-place change to a char* segfault?1Tim Rentsch
5 Aug 24  i ii `* Re: relearning C: why does an in-place change to a char* segfault?6Lawrence D'Oliveiro
5 Aug 24  i ii  `* Re: relearning C: why does an in-place change to a char* segfault?5Keith Thompson
5 Aug 24  i ii   `* Re: relearning C: why does an in-place change to a char* segfault?4Lawrence D'Oliveiro
6 Aug 24  i ii    `* Re: relearning C: why does an in-place change to a char* segfault?3Keith Thompson
6 Aug 24  i ii     `* Re: relearning C: why does an in-place change to a char* segfault?2Bart
6 Aug 24  i ii      `- Re: relearning C: why does an in-place change to a char* segfault?1David Brown
4 Aug 24  i i`- Re: relearning C: why does an in-place change to a char* segfault?1David Brown
4 Aug 24  i `- Re: relearning C: why does an in-place change to a char* segfault?1Keith Thompson
1 Aug 24  +- Re: relearning C: why does an in-place change to a char* segfault?1Keith Thompson
14 Aug 24  `- Re: relearning C: why does an in-place change to a char* segfault?1Tim Rentsch

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal