Rich Salz wrote in
<CAFH29tp4fZR7ct57F-BmyqoJwwRfHkSbiVPS1mj89e-_gzhsHQ(a)mail.gmail.com>:
|On Mon, Sep 30, 2024 at 3:12 PM Steffen Nurpmeso <steffen(a)sdaoden.eu> wrote
|> noone ever told them that even the eldest C can be used in a safe
|> way;
|
|Perhaps we have different meanings of the word safe.
|
| void foo(char *p) { /* interesting stuff here */ ; free(p); }
| void bar() { char *p = malloc(20);
| foo(p);
| printf("foo is %s\n", p);
| foo(p);
|}
|Why should I have to think about this code when the language already knows
|what is wrong.
It can also be used in an unsafe way?
O-ha. Sounds dangerous in my ears (given human behaviour in
particular). I was so focused on winning against Putin, .. that
i did realize this context.
(Btw i like The Cures new song "Alone", after 14 years!, and its
accompanying thrilling mega mega boom boom boom video.)
P.S.: In the real world i would now, as the conservative and
integer (up against the floating-point!) person that i am point
"you" to C++, and simply pass a string object.
But let us pass a reference so we gain compile-time non-NIL "meat"
(vegan!!), and impressive state-of-the-art speed characteristics.
Human behaviour can destroy everything: faster so with C++!
--End of <CAFH29tp4fZR7ct57F-BmyqoJwwRfHkSbiVPS1mj89e-_gzhsHQ(a)mail.gmail\
.com>
Btw i hate these random message-ids, they reveal nothing! Like in
all those rooms i never visit. I am all for the wonderful Klaus
von Dohnanyi, now also 96 years old, and his saying "Ach bitte,
sagen Sie nicht Chatroom, sagen Sie Plauderstübchen" ("Oh please,
do not say chatroom, just say [little talk chamber][ʃtyːpçən]" [1]
(needs scripting-enabled browser).
[1]
https://translate.google.com/?sl=auto&tl=en&text=Plauderst%C3%BCbch…
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)