From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.ada Subject: Re: How to get Ada to ?cross the chasm?? Date: Tue, 01 May 2018 17:02:12 -0700 Organization: A noiseless patient Spider Message-ID: <87r2muorgb.fsf@nightsong.com> References: <1c73f159-eae4-4ae7-a348-03964b007197@googlegroups.com> <87k1su7nag.fsf@nightsong.com> <87po2la2qt.fsf@nightsong.com> <87in8buttb.fsf@jacob-sparre.dk> <87wowqpowu.fsf@nightsong.com> <16406268-83df-4564-8855-9bd0fe9caac0@googlegroups.com> <87o9i2pkcr.fsf@nightsong.com> <87bme2oy91.fsf@nightsong.com> <877eoom26h.fsf@nightsong.com> <87y3h3lpel.fsf@nightsong.com> <87po2fl1pm.fsf@nightsong.com> <3bde50df-4b23-4c7f-a1e8-db51d283e1aa@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: reader02.eternal-september.org; posting-host="c542ccd1be7cc45dffb8a8de81e34fd0"; logging-data="10695"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19GAzY3CF87EFGc13dcOn2s" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cancel-Lock: sha1:AxFMtFY+JrWv/KaTFW83qzG0jKU= sha1:Y1vbbbktHbjX4eIrcu98PFJjS5c= Xref: reader02.eternal-september.org comp.lang.ada:51901 Date: 2018-05-01T17:02:12-07:00 List-Id: "Dan'l Miller" writes: > I am pretty sure that Jeffrey Carter's school of thought would be > focusing on the “clever run-time devices to avoid excessive copying” Haskell in fact has mutable arrays just like you're used to, but using them safely requires treating them as something like i/o devices, so the array state is threaded through a computation that's separated off from the rest of your program by the type system. It's a little bit hard to explain. The upshot is that it's there if you need it, but you're better off avoiding it if you can. Ben Lippmeier (one of the GHC developers at times) has one of the better critiques of Haskell's array story, starting on page 17 here: http://benl.ouroborus.net/papers/2010-impure/lippmeier-impure-world.pdf