Joachim Schimpf wrote:
> So, you found that metaprogramming using strings is painful.
> Well observed. Conclusion?
I am happy that you know my intention is for metaprogramming.
This is the key point , around which I am recently asking
questions so frequently.
Is there anything simpler than using string ?
If string can be easily used for metaprogramming ,
we can metaprogram just in the same prolog language,
because the system can read and execute the
prolog codes written by system itself in a string from,
thus there is no need for learning new syntax ,etc.
Just look at between C++ and LISP ,you will know the
difference. For C++ to metaprogram , people use template.
For the lisp , people use macro. Template is a totally
different language from the oriniginal C++, but macro is
almost identical to the original Lisp . Lisp can treat data as
program and program as data , but C++ can't . This makes
total difference between LISP's metaprogramming and C++'s.
So , if using string is painful for metaprogramming ,
what is not ? And the pain from using string is unnecessary,
if we can control and manipulate the input buffer.
I have tried other way for metaprogramming . And there happened
some problems . I will tell the story later.
··········@bbs.ee.ncu.edu.tw wrote:
> Lisp can treat data as
> program and program as data
So can Prolog.
> So , if using string is painful for metaprogramming ,
> what is not ?
Prolog terms.
Cheers
Bart Demoen