[Haskell-cafe] extending the notion of notation (was: extending Do notation)
mwm at mired.org
Tue May 20 21:08:31 UTC 2014
On Tue, May 20, 2014 at 3:44 PM, MigMit <miguelimo38 at yandex.ru> wrote:
> On 21 May 2014, at 00:32, Mike Meyer <mwm at mired.org> wrote:
> > On Tue, May 20, 2014 at 2:51 PM, MigMit <miguelimo38 at yandex.ru> wrote:
> > And no, whatever Lispers want to believe in, program is not AST. Program
> is TEXT.
> > No, a program is a bunch of bits the computer can execute. It can be
> represented as TEXT, or an AST, or even a diagram in some graphical
> programming tool somewhere - all of which we also confusingly call a
> Incorrect. There are programs in pseudocode, programs for MIX, programs
> for machines they don't make anymore. Ada Lovelace created some programs
> for Babbidge's machine. Program can be buggy, or unfinished. Neither of
> these types of programs can be executed, but they are still programs.
Incorrect. Those are all representations of programs. Whether they can or
can't be executed is immaterial to that status. As I said, it's common to
call a representation of a program a program as well, because the context
lets the reader sort it out. But in this context, it matters, because we're
talking about alternative representations for programs.
Turning your Haskell representation of a program into an actual program
generally requires it to be translated through multiple different
representations: core, C, assembler and finally you get a program. There
may be some ASTs in there as well. Hopefully, they all preserve the intent
of the programmer (otherwise, one or more of the steps in your tool chain
> I'd say that what makes program a program is not how it's executed, it's
> how it is read. By humans.
I'd say that's what makes a text (or whatever) a representation of a
program: how it's read by humans. Whether or not it can be turned into an
actual, honest to goddesses executable program is another issue entirely.
> And, as for now, there are no adequate alternatives to text
Now you got it! To add the proper emphasis: there are no adequate
alternatives to text *representation*. Exactly right! The text is a
representation of a program, not a program.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe