Learning Haskell makes you a better programmer?

Russel Winder russel at winder.org.uk
Fri Dec 28 08:03:09 PST 2012


On Fri, 2012-12-28 at 16:38 +0100, deadalnix wrote:
[…]
> Sure. To make that clear I have to reintroduce the context : I 
> was answering to a post that stated that even if the language 
> don't support immutability, you can have immutability simply by 
> not mutate data.
> 
> To benefit from immutability, you have to be 100% sure that no 
> piece of code will mutate the data ever. If you have no support 
> for that, you break abstraction, because you have to know the 
> internal of every piece of code you use, in order to know if the 
> data are modified or not. If you have to know the internal of 
> each piece of code you use, then abstraction is broken.

I am not sure I would relate this issue to abstraction per se, though it
is about preconditions, postconditions and assumptions that can, or
cannot, be made.  I think we agree on the substance just differ on the
language used to describe the concepts.  

> If abstraction is broken, then the ability to code will be 
> reduced as the codebase grow, to a point where nothing is 
> maintainable anymore. When I say that it will not not scale, I'm 
> talking about scaling the technique to a bigger codebase, not 
> actually scaling the resulting program to bigger workload.

OK, I think we agree on substance just differ on the choice of language
used to describe this situation. Here though "abstraction" and "broken
abstraction" can work for me :-)

This issue is one of the problems with very large Python codebases. They
can be got round with functional tests, but strong discipline is needed.
Ada and Modula-2 introduced a lot of good stuff!

Thanks for taking the time to go into more depth.

> The subject is quite big, and I have proposed a talk about it in 
> DConf 2013 (I'm waiting for Walter to accept or reject).

Sadly I won't be able to get to the conference: to travel on an
aeroplane for longer than about 2 hours I have to lie flat for long
periods. This generally means great cost, that is only affordable when
someone else is paying, which usually means client-paid
consultancy/training gigs.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20121228/7e209c1a/attachment.pgp>


More information about the Digitalmars-d mailing list