Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #91164 > unrolled thread

Re: "C++ on the Move" by Darryl K. Taft

Started byTim Rentsch <tr.17687@z991.linuxsc.com>
First post2023-07-20 09:52 -0700
Last post2023-07-20 21:01 +0100
Articles 2 — 2 participants

Back to article view | Back to comp.lang.c++

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: "C++ on the Move" by Darryl K. Taft Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-07-20 09:52 -0700
    Re: "C++ on the Move" by Darryl K. Taft Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-07-20 21:01 +0100

#91164 — Re: "C++ on the Move" by Darryl K. Taft

FromTim Rentsch <tr.17687@z991.linuxsc.com>
Date2023-07-20 09:52 -0700
SubjectRe: "C++ on the Move" by Darryl K. Taft
Message-ID<86pm4mzft2.fsf@linuxsc.com>
Ben Bacarisse <ben.usenet@bsb.me.uk> writes:

> Tim Rentsch <tr.17687@z991.linuxsc.com> 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?

[toc] | [next] | [standalone]


#91169

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2023-07-20 21:01 +0100
Message-ID<87mszqpd1l.fsf@bsb.me.uk>
In reply to#91164
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:

> Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
>
>> Tim Rentsch <tr.17687@z991.linuxsc.com> 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?

Yes.

-- 
Ben.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.c++


csiph-web