Re: Data Flow languages and programming - Part I



In article <slrnhf368q.19is.marcov@xxxxxxxxxxxxxxx>, marcov@xxxxxxxx
says...
On 2009-10-28, Pascal J. Bourguignon <pjb@xxxxxxxxxxxxxxxxx> wrote:
On 2009-10-28, Pascal J. Bourguignon <pjb@xxxxxxxxxxxxxxxxx> wrote:
Now if you need to write a million of source line, then just don't
do it. Use metaprogramming to generate this million of source lines
from a smaller source. And so on, you can add layers of
metaprogramming all you need to compact your sources and always have
something of manageable size.

So, you're saying that *every* programming problem can be solved in at
most a few tens of thousands of lines of code?

Can you not specify all programming problem in less that a few
thousands of lines of specification?

Yes but that is usually a top-down specification, and while implementing
lots of little decisions still have to be made.

So usually, such specifications are not complete.

Well, you can always write more detailed specifications, but I can
assure you that sales peoples will always be able to put the whole
specifications of your software on a 2-page booklet.

Yes, but strictly speaking that is a summary. Not a full specification.

IOW you reduce complexity by removing details, and describe first order
operation only. Not by introducing an abstraction that reduces data.

Certainly some problems can, but most can't. Metaprogramming is just
a form of compression, and there is no compression system that can
reduce every source below a given size.

I like that analogy.

I think a better analogy is that metaprogramming is a form of indexing
or referencing.

A compressed file must contain all the information in the original file
in such a way that the original file can be restored. But in a high-
level or metalanguage I don't need to know all the nuts and bolts
beneath the surface. So, for example, if a specification requires you to
calculate the Chi-square of a data set, then it may be possible to use a
trusted statistics package to get tre results, without knowing what the
source language is, what hardware it will be processed on or even what
Chi-square is. The code is 'out there' somewhere, but it is not part of
your code, so the statistics package is not compressed into your code
but referenced by it.

So, unlike a compressed file (where there is necessarily a decompression
algorithm that returns a byte-perfect copy of the uncompressed file), a
metaprogramme cannot be guaranteed to operate any specific binary code
when it is run and there is no obvious limit to the degree of
'compression' that can be obtained. So when Chekov, in the bridge of the
Enterprise, leans forwards and says (in Russian-accented English)
"Computer, scan the anomoly in that star-system and find what is causing
the energy fluctuations", he has just issued a very 'compressed'
metaprogramme to the computer.

Mike
.


Quantcast