Path: csiph.com!news.mixmin.net!eternal-september.org!news.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: Thu, 20 Jul 2023 09:52:09 -0700 Organization: A noiseless patient Spider Lines: 42 Message-ID: <86pm4mzft2.fsf@linuxsc.com> References: <86o7ov6noo.fsf@linuxsc.com> <867cuq7st5.fsf@linuxsc.com> <87ttxu5c4h.fsf@bsb.me.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: dont-email.me; posting-host="3857442d865f8a7bff3454fde02b814b"; logging-data="2949588"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+k4ZQG3+HcyYwa63cwMmBpIiQC9wDWDQo=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:J5SCcK8YTWOmquhG6+6ND7MzfMY= sha1:rKP1AOGaHPwK6kbMs9tL337vZTM= Xref: csiph.com comp.lang.c++:91164 Ben Bacarisse writes: > Tim Rentsch writes: > >> ... 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. > > Sounds odd, but then I don't know Erlang at all well. APL has > assignable variables and branching. What is the major barrier to > writing procedurally in APL? > > I'm not disputing that one could think and write procedurally in Erlang > (I really don't know), but I'd say that Haskell would a better example > of a language that makes it hard. I think you'd have to code up the > denotational semantics of small procedural language to write procedural > in Haskell. Disclaimer: I have some experience programming in both APL and Haskell, but am by no means an expert in either language. I'm not sure whether it would be harder to write procedural-style code in Haskell than in APL. Whether it is or not, my intention was only to offer one example, not necessarily the best example. As to why APL is hard to write in procedurally, I would say it has poor support for some of the important elements of procedural languages. Control flow in APL is clumsy. APL does allow procedures, but they are limited compared to, for example, functions in C. Much of the programming done in procedural languages is used to operate on data structures, but APL doesn't have good facilities for general data structures. To explain this another way, consider any moderately sized C program (1500 lines or more, just to pick a number), and imagine trying to re-write it in APL. Chances are the program would need to be not just re-written but completely re-designed. And the resulting program would very likely not look very procedural-ish. Does this explanation help clarify my statement?