This thread has been touching upon three issues - functional languages
as a way of expressing problems, Excel as a language environment, and
the programmer.
Today, relational databases are widely accepted. However Ted Codd did
not invent the relational model because he thought relations were neat.
If you look at what he said at the time, his motivation was to make
corporate data more accessible to non-programmers. Forty years ago he
thought there were less programmers than there were programs to be
written. Arguably the same is true today.
When I was a boy, I would see IDMS recordsets like this:
200
300
150
200
230
etc
What this represented was
2011/Q1 Sales = £200
2011/Q2 Sales = £300
2011/Q2 Sales = £150
Worse still you would have:
12
200
27
300
etc
which meant:
2011/Q1 Sales = £200
2011/Q1 Units = 12
2011/Q2 Sales = £300
2011/Q2 Units = 27
etc
Tedd said you must use relations. Relations are unordered so you can't
hide information in the order of data. Also you must have a field name
for each field (and it should be on the same domain, so Sales shouldn't
be in the same 'column' as Units).
You would therefore have to have:
Period Sales Units
2011/Q1 200 12
2011/Q2 300 27
etc
Whilst- as we all know - that typically doesn't tell you everything you
need to know when you come across a recordset, it makes it much easier
for someone not deeply involved in the system concerned, to work out
what is going on.
Put it another way, using relations makes it less likely you will make a
mistake because you didn't know the subtleties of the behaviour of the
programs generating that data.
Then, relations are amenable to first order predicate calculus. This
resticts the complexity of the operations you need to carry out.
When you consider the merits of functional languages, I believe you
should take into account not only the elegance with which you can
express what you want to do, or how amenable it is to eg parallel
processing. You should also consider whether it strikes a better balance
between such issues and accessibility. Does all your terseness and
'elegance' give you a justifiable advantage over something simpler which
could be more easily handled by a person of less capability?
···
--
Posted via http://www.ruby-forum.com/.