=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 *

Generate compiler-variants for several builtins, esp. those used by
examples/bench.tcl - NB: bench.tcl is currently failing.

=item *

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

=item *

It would be nice if C<--pir> generated more human readable output. It's OK,
I think, if the generated PIR has more whitespace all the time, even if
a human isn't peeking.

=item *

It should be possible to implement some builtins in terms of other builtins.
See http://wiki.tcl.tk/15051 for some musings on this. We already at least
partial implementations of most of the items there. If we go this route, then
we need to pre-compile the builtins-in-tcl into PIR at build time.

=back

=head2 Generic tasks

=over 4

=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.
Very likely due to the build_dynclasses targets that don't specify explicit
deps.

=back

=head2 PIR tasks

=over 4

=item Use new argument handling from inside [proc]s

Most builtins take a varying number of arguments, so it's hard to use this
there, but for procs without {args} arguments, this error handling can be
help eliminate a chunk of the wrapper script. Throw an exception *inside*
the sub, catch it, and then throw the appropriate tcl exception about the
wrong # of args. See lt's mail to the p6i titled:

 pdd03 and Overflow/Underflow - r10269

=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 returncodes.pir

The __clone macro should be moved to 'lib/macros.pir'.

=item [expr]

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 [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
