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!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.ada Subject: Re: Haskell, anyone? Date: Tue, 17 Nov 2015 10:04:47 -0800 Organization: A noiseless patient Spider Message-ID: <87a8qccxj4.fsf@nightsong.com> References: <14533506-4289-4148-b8c4-e970f5778b26@googlegroups.com> <87si45msuz.fsf@nightsong.com> <35d6dc4f-4f2e-4e75-925c-e4acc7c8f112@googlegroups.com> <76ea0bc9-537b-4c68-a728-4f634cf6de52@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="ac130717aa033f117b1251f50cb4c61b"; logging-data="4194"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19GJCoe/G+uLhmA+Jm93/ZT" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:pZIn0RUC/6lUi0hE522Ctm6zCb4= sha1:dCBhjzIabJnVCVtf/L2AaC49mLY= Xref: news.eternal-september.org comp.lang.ada:28422 Date: 2015-11-17T10:04:47-08:00 List-Id: Hadrien Grasland writes: > I would say that recursion is the goto statement of functional > programming languages : necessary in order to achieve > Turing-completeness, and occasionally useful, but makes control flow > messy and programs very difficult to reason about, No that's continuations ;-). Recursion works fine and is simpler than loops to reason about and simple to use. > The recursive hoops that one has to jump through in order to "modify" > a complex data structure are especially gruesome. Just implemented a > radix tree in OCaml today The FP preference would be to use an immutable data structure like a red-black tree: http://goodmath.scientopia.org/2009/11/30/advanced-haskell-data-structures-red-black-trees/