Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <uveeo1$33v1t$1@dont-email.me>
Deutsch   English   Français   Italiano  
<uveeo1$33v1t$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups: comp.lang.c
Subject: Re: Recursion, Yo
Date: Sat, 13 Apr 2024 19:17:53 +0200
Organization: A noiseless patient Spider
Lines: 82
Message-ID: <uveeo1$33v1t$1@dont-email.me>
References: <uut24f$2icpb$1@dont-email.me> <uutqd2$bhl0$1@i2pn2.org>
 <uv2u2a$41j5$1@dont-email.me> <87edbestmg.fsf@bsb.me.uk>
 <uv4r9e$mdd3$1@dont-email.me> <uv5e3l$q885$1@dont-email.me>
 <uv5gfd$qum1$1@dont-email.me> <uv5lgl$s6uj$1@dont-email.me>
 <uv61f6$v1jm$1@dont-email.me> <uv68ok$11080$1@dont-email.me>
 <uv7a8n$18qf8$3@dont-email.me> <uv867l$1j8l6$1@dont-email.me>
 <_zSRN.161297$m4d.144795@fx43.iad> <20240411075825.30@kylheku.com>
 <r8TRN.114606$Wbff.54968@fx37.iad> <uva6ep$24ji7$1@dont-email.me>
 <uvah1j$26gtr$1@dont-email.me> <uvanua$27qn8$1@dont-email.me>
 <uvbbed$2cdhc$1@dont-email.me> <uvbhph$2do64$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 13 Apr 2024 19:17:54 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="631a0b1dedfa84c6e863811882d6f518";
	logging-data="3275837"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/t/qB0VAEpxpAN2qn0cjF/"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
Cancel-Lock: sha1:h+LiwiitamweQ1XGmko9ugIau8Q=
In-Reply-To: <uvbhph$2do64$1@dont-email.me>
X-Enigmail-Draft-Status: N1110
Bytes: 5496

On 12.04.2024 16:51, David Brown wrote:
> On 12/04/2024 15:03, Janis Papanagnou wrote:
>>
>> Another one is that you can write (e.g. in Algol 68 or many other
>> higher level languages) the equivalent of - again a simple example -
>>
>>    int x = 2 * pi * r
>>
>> without necessity to know whether pi is a constant, the result of a
>> function (calculation), the result of a function implicitly called
>> just once on demand, or whatever else. Conceptually as a programming
>> language user you want the value.
>>
> 
> But is that a good thing? 

In my book it is a good thing (but I wouldn't overestimate it)...

> For some programming, especially with
> higher-level languages, then it is fine.  For other types of
> programming, you want to know if functions are called in order to have a
> better idea of the flow of control and the efficiency of the code, plus
> perhaps thread safety.

....because the (in practice valid!) topics you mention _should_ not
be of concern to the programmer. The "idea of the flow" should, IMO,
certainly not depend on parenthesis. I'll try an example from a C++
context... - Say, I want to get the "length" of a container. What I
indeed care about is the complexity of that operation, but that
should be part of the library specification. C++/STL provides me
with O(1), O(N), O(x) information that I can count on. Though the
procedure to determine some length() might depend on the type of
the container; it may be just an attribute access, it might be a
difference computation (last-first+1), or it might be an iteration.
Despite that could be hidden in a function length() you need the
O(x) information to be sure about efficiency. (Or to look into the
function's source code of the function, if available, to analyze
the algorithm.)

What I'm basically trying to say is that length() doesn't provide
the certainty or information that one needs or likes to have. All
it provides is a syntactical, technical detail of the language.
With it you get the uncertainty of "Uh-oh, there's parentheses;
now does it mean that it's expensive to use it?" - But you don't
get relevant information from the parentheses!

For the [general, non-C] programmer it's (IMO) clearer to not put
(unnecessary) syntactical burden on him. He wants a value 'len'?
He just gets the value 'len' (and not len())!

I think I've already said that it's to a large degree probably
personal experience and preferences whether one comes to the
conclusion that it's a good thing, a bad thing, or even "mostly
harmless" (meaningless).

(These are the thoughts from someone who did not start his CS life
with C-like languages. From someone who has seen a lot of languages
with good concepts that needed decades to only slowly - if at all -
find their way into the modern, mainstream, or hyped languages. I
thought that evolution in programming languages would benefit from
good concepts. But "Not Invented Here" principle seems to dominate.
<end-of-rant>)

> 
> Just for fun, this is a way to let you define a function-like object
> "pi" in C++ that is called automatically, without parentheses :
> [...]
> I am not giving an opinion as to whether or not this is a good idea (and
> obviously it is completely redundant in the case of a compile-time
> constant).  Some people might think C++ is great because it lets you use
> tricks like this, some people might think C++ is terrible because it
> lets you use tricks like this :-)

(Nice example.) - Well, to me C++ is (or was) great because it
supported what I've learned to love from using Simula; classes
and inheritance, the whole OO paradigm, "living objects" and a
lot more that's still "undiscovered" by other languages. What I
found terrible was that it inherited the whole uncertainty from
using a low level language like C.

Janis