|
[Date Index]
[Thread Index]
[Author Index]
Re: Mathematica daily WTF
- To: mathgroup at smc.vnet.net
- Subject: [mg115180] Re: Mathematica daily WTF
- From: DrMajorBob <btreat1 at austin.rr.com>
- Date: Tue, 4 Jan 2011 04:21:02 -0500 (EST)
Procedural code can be written particularly badly... and so can functional
code.
For elegance, efficiency, and readability, both depend on a good
programmer's consistent style.
Functional code, in addition, needs good names for its functions.
Bobby
On Mon, 03 Jan 2011 02:55:55 -0600, Bill Rowe <readnews at sbcglobal.net>
wrote:
> On 1/2/11 at 4:54 AM, dave at removedbailey.co.uk (David Bailey) wrote:
>
>
>> Procedural code lets anyone, 'hack' any process they desire, whereas
>> functional code becomes conceptually harder and harder as
>> complications set it - at least to those of us who spent many years
>> writing code in C and Fortran!
>
>> As regards aesthetics, I'd say that sometimes functional code looks
>> much more elegant than the procedural equivalent, but other times,
>> it just looks obscure!
>
> I think the obscurity of functional code is largely a matter of
> what you get used to. When I first started with Mathematica, I
> only used procedural code since this is what I had been used to
> with C or C++. But it has been years since I've done anything in
> C or C++. I now use Mathematica on a daily basis and it has been
> so long since I've used procedural code I have to refer to the
> documentation to check syntax. I am now at the point where I
> find it much easier to understand functional Mathematica code
> than procedural Mathematica code.
>
>
--
DrMajorBob at yahoo.com
Prev by Date:
Re: automatic integral output simplification
Next by Date:
Re: pattern bugs and comment on intuitive syntax for the New Year
Previous by thread:
Re: Mathematica daily WTF
Next by thread:
Re: Mathematica daily WTF
|