in reply to Re: Re: Keyword parser function mapping module
in thread Keyword parser function mapping module
Except, I don't want to use eval or do. You're missing the fact that this is a QA application.
Well, if you reread the original post at the top of the thread, it is QA people who will be using this. They aren't programmers, but presumably they know how to do QA. If not, the company has problems that inventing a scripting language won't solve.
As for Turing-completeness, I might be wrong, but I believe that GOTO, JZ, and JNZ are the minimal requirements for Turing completeness
It depends. Turing-completeness is about equivalence,
not a specific implementation. Unlambda is Turing
complete but does not provide GOTO or anything like
it, really. (All the work in Unlambda is done by
combining and applying functions.) Pascal does not
provide GOTO and is certainly Turing complete.
I don't think Befunge provides GOTO; it handles
control flow by changing directions, not positions.
Hofstadter
argues convincingly that sufficiently
powerful formal systems in math (e.g., Typographical
Number Theory or Principia Mathematica) are
Turing-equivalent.update: No, wait,
that's not right. TNT represents all primitive
recursive truths, but not all general recursive
truths. I was momentarily
confused. P.M. is probably similar.
It is, however, almost certainly possible to
construct a Turing equivalent formal system.
Also, I do not see why both JZ and JNZ should be required; they are, as near as I can determine, equivalent; at _least_ they are equivalent if you also have GOTO, because a JNZ followed by a GOTO is equivalent to a JZ, and a JZ followed by a GOTO is equivalent to a JNZ. However, a decision mechanism of some kind (what I called "conditionals") is needed. JZ and JNZ can provide this. In Perl we use (among other things) if. I suspect, however, that conditionals are a feature the QA people in question (who don't want to learn Perl) won't need, at least, not initially. All they really want to do, as I understand it, is call a series of prefabricated procedures that the OP is going to write.
$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Keyword parser function mapping module
by dragonchild (Archbishop) on Jan 07, 2004 at 15:27 UTC | |
by jonadab (Parson) on Jan 08, 2004 at 04:49 UTC |