Blog post: What D got wrong

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Dec 18 15:47:27 UTC 2018


On Tue, Dec 18, 2018 at 08:17:28AM +0000, Russel Winder via Digitalmars-d-announce wrote:
> On Mon, 2018-12-17 at 12:16 -0800, Walter Bright via Digitalmars-d-announce
> wrote:
> > […]
> > 
> > Going pure, however, is much harder (at least for me) because I'm
> > not used to programming that way. Making a function pure often
> > requires reorganization of how a task is broken up into data
> > structures and functions.

Component-based programming helps a lot in this regard. It breaks the
problem down in a way that, when done correctly, captures the essence of
the algorithm in a way that's easily translated to pure code (esp. D's
expanded definition of purity).


[...]
> I can recommend a short period of working only with Haskell. And then
> a short period working only with Prolog. Experience with Java and
> Python people trying to get them to internalise the more declarative
> approach to software, shows that leaving their programming languages
> of choice behind for a while is important in improving their use of
> their languages of choice.
[...]

It's all about the mindset. Being forced to think about the problem from
a purely functional perspective gives you a radically different
perspective from the usual imperative paradigm, and IME often yields
insight into the essential structure of your programming problem that is
otherwise easily obscured by the imperative structure imposed upon it.


T

-- 
Klein bottle for rent ... inquire within. -- Stephen Mulraney


More information about the Digitalmars-d-announce mailing list