Path: csiph.com!news.mixmin.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c++
Subject: Re: "C++ on the Move" by Darryl K. Taft
Date: Tue, 04 Apr 2023 23:21:26 -0700
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <867cuq7st5.fsf@linuxsc.com>
References: <86o7ov6noo.fsf@linuxsc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="3e40893fec19eeb2f5d61a30b72606e6"; logging-data="3994189"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19aV3mYcazLJsoC4ndkzbzPtwxVQEH7QpM="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:hCWvHo2Km3rIIrZ0vXn6kSKg+Qo= sha1:+D/qxY4BYSAzgCkxxP8p3u+1Jlw=
Xref: csiph.com comp.lang.c++:89915
kalevi@kolttonen.fi (Kalevi Kolttonen) writes:
> Tim Rentsch wrote:
>
>> kalevi@kolttonen.fi (Kalevi Kolttonen) writes:
>>
>>> There is this saying "You can write C in any language", [...]
>>
>> I don't remember hearing that saying before, but it is way off
>> the mark. How C deals with indexing and pointer arithmetic
>> causes almost every other language to be a poor venue for
>> writing C.
>
> I guess the main point there is just that you can do
> *traditional procedural* programming in many languages.
>
> The intention is not to suggest that you can use all
> the features of C in other languages. As far as I understand
> it, you could as well say "You can write Pascal in any language"
> and the core meaning of this saying would not change.
>
> If you want to write in Erlang, the procedural paradigm does
> not get you very far at all. Of course any programming
> background helps, since all programming depends on analytical
> and logical thinking.
Back in the day the saying was "You can write FORTRAN in any
language." This epigram does have a nice ring to it, but it
wasn't true even in the 1960s, e.g., Lisp or APL, among others.
Regarding Erlang, AFAICT the biggest impediment to writing
FORTRAN in Erlang is that Erlang doesn't have arrays. Erlang
also doesn't have the common procedural iterative control
structures, but it isn't hard to emulate those by writing
functions that take closures. Simple assignment can be done
using Erlang's imperative map/dictionary (don't recall what name
Erlang uses for this) facility. I think it isn't too hard to
think and write procedurally in Erlang, if one chooses to do so.
Granted, most people writing Erlang don't do that, but that is
not due to inherent limitations in the language. It would be
harder, for example, to think and write procedurally in APL.