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