make return values from match in a list context, as well as $& et
[p5sagit/p5-mst-13.2.git] / Todo
1 Always check out the latest perl5-porters discussions on these subjects
2 before embarking on an implementation tour.
3
4 Tie Modules
5         VecArray                Implement array using vec()
6         SubstrArray             Implement array using substr()
7         VirtualArray            Implement array using a file
8         ShiftSplice             Defines shift et al in terms of splice method
9
10 Would be nice to have
11         pack "(stuff)*", "(stuff)?", "(stuff)+", "(stuff)4", ...
12         contiguous bitfields in pack/unpack
13         lexperl
14         bundled perl preprocessor/macro facility
15             this would solve many of the syntactic nice-to-haves
16         use posix calls internally where possible
17         gettimeofday (possibly best left for a module?)
18         format BOTTOM
19         -i rename file only when successfully changed
20         all ARGV input should act like <>
21         report HANDLE [formats].
22         support in perlmain to rerun debugger
23         regression tests using __DIE__ hook
24         lexically scoped functions: my sub foo { ... }
25         wantlvalue?  more generalized want()/caller()?
26         named prototypes: sub foo ($foo, @bar) { ... } ?
27         regression/sanity tests for suidperl
28         iterators/lazy evaluation/continuations/first/
29             first_defined/short-circuiting grep/??
30             This is a very thorny and hotly debated subject,
31             tread carefully and do your homework first
32         generalise Errno way of extracting cpp symbols and use that in
33             Errno, Fcntl, POSIX (ExtUtils::CppSymbol?)
34         the _r-problem: for all the {set,get,end}*() system database
35              calls (and a couple more: readdir, *rand*, crypt, *time,
36              tmpnam) there are in many systems the _r versions
37              to be used in re-entrant (=multithreaded) code
38              Icky things: the _r API is not standardized and
39              the _r-forms require per-thread data to store their state
40         memory profiler: turn malloc.c:Perl_get_mstats() into
41             an extension (Devel::MProf?) that would return the malloc
42             stats in a nice Perl datastructure (also a simple interface
43             to return just the grand total would be good)
44         a way to make << and >> to shift bitvectors instead of numbers
45
46 Possible pragmas
47         debugger
48         optimize (use less qw[memory cpu])
49
50 Optimizations
51         constant function cache
52         switch structures
53         foreach(reverse...)
54         cache eval tree (unless lexical outer scope used (mark in &compiling?))
55         rcatmaybe
56         shrink opcode tables via multiple implementations selected in peep
57         cache hash value?  (Not a win, according to Guido)
58         optimize away @_ where possible
59         tail recursion removal
60         "one pass" global destruction
61         rewrite regexp parser for better integrated optimization
62         LRU cache of regexp: foreach $pat (@pats) { foo() if /$pat/ }
63
64 Vague possibilities
65         ref function in list context?
66         make tr/// return histogram in list context?
67         loop control on do{} et al
68         explicit switch statements
69         built-in globbing
70         compile to real threaded code
71         structured types
72         autocroak?
73         modifiable $1 et al