=head1 Tcl TODOs

=head2 Milestones

The next *big* milestone is to be able to run tcl's test suite natively. That
means being able to deal with all the commands in:

http://cvs.sourceforge.net/viewcvs.py/tcl/tcl/library/tcltest/tcltest.tcl?view=markup

This will require a lot of work. On the plus side, we'll be passing a lot more
tests by then. =-)

=over 4

=item 0

Add the "unknown command" logic from the (commented out) tclcommand's interpret
to the compiled version, and then remove the interpret :method.

=item 1

Generate compiler-variants for several builtins, esp. those used by
examples/bench.tcl

Modify the compiler for tclcommand to generate the inline version if
it's available. (C<proc> and C<expr> should also be straightforward, as they
already compile anyway.)  [Completed: incr, break, continue, for, while]

Note: compiled builtins always take two args: the register_num to begin
using for the inlined code, and a single container pmc that contains the
pre-parsed arguments. They return just like the compile methods in lib/tcl*.pir,
that is, the register_num the result is in, and the inlinable code.

=item 2

When an inline compiled version exists, use it, but IFF a global counter
indicates no procs have been redifined.  Update proc and rename to increment
this counter whenever they are called.

=item 3

Add compiled TclComment objects, which do nothing other than generate
PIR comments with the same text.

=item 4

It would be nice if C<--pir> generated human readable output. As long as
it's functionally equivalent, internally generated PIR need not be pretty.

=back

=head2 Generic tasks

=over 4

=item pbc_merge

Take advantage of the new C<pbc_merge> to combine the various .pbc files
into a singleton.

=item Makefile deps

Should be more explicit about the PMC dependencies in the makefile. *something*
is causing things to get rebuilt unecessarily each time "make tclsh" is run.

=back

=head2 PIR tasks

=over 4

=item keyed access

tcl is not using Keys when getting from aggregates. It probably should,
at least for language interoperability.

=item implement default globals, etc.

global variables provided by tcl libary. L<tclvars>.

global variables provided by tcl interpreter. L<tclsh>

source per-user settings. L<tclsh>

=back

=head2 Design tasks

=over 4

=item provide a way to access existing library PIR from Tcl.

Perhaps via [namespace import]? Can fake it right now with [inline]

=back

=head2 refactoring tasks

=over 4

=item [expr]

clean up the generated expr subs so that they use a unique id. (in add
to being anon)

Add "is_const" global which checks to see if something is, in fact,
constant. (which will allow us to then constant fold. Leo assures us
that constant folding isn't necessary at the language level, but.)

TBD: ternary op

TBD: functions that take > 1 arg.

TBD: Argument type requirements - Currently works ONLY on bitand - esp need
to get any that require int-only args, as we can now /generate/ floats,
even if we cannot specify them. This is all supportable by MMD - we just
need to specify the correct errors to throw.

=back

=head2 Things we can't do yet (need parrot)

=over 4

=item [regexp], [regsub], -regexp

Don't have a tcl-style RE PGE class avaialable yet.

=item [pwd], [cd] [#???]

Need this to run tcltest

=item [interpinfo name] [#36277]

how to do this from inside parrot? Design issue: what's the right
answer? if we're called as C<parrot tcl.pbc foo.tcl>, do we report just
C<parrot>, or C<parrot tcl.pbc> ?

=item [after], [vwait]

pending the event system thunk.

=back

=cut
