[14544] | 1 | Always check out the latest perl5-porters discussions on these subjects |
---|
| 2 | before embarking on an implementation tour. |
---|
| 3 | |
---|
| 4 | Bugs |
---|
| 5 | remove recursion in regular expression engine |
---|
| 6 | fix memory leaks during compile failures |
---|
| 7 | make signal handling safe |
---|
| 8 | |
---|
[10723] | 9 | Tie Modules |
---|
| 10 | VecArray Implement array using vec() |
---|
| 11 | SubstrArray Implement array using substr() |
---|
| 12 | VirtualArray Implement array using a file |
---|
| 13 | ShiftSplice Defines shift et al in terms of splice method |
---|
| 14 | |
---|
| 15 | Would be nice to have |
---|
[14544] | 16 | pack "(stuff)*", "(stuff)?", "(stuff)+", "(stuff)4", ... |
---|
| 17 | contiguous bitfields in pack/unpack |
---|
[10723] | 18 | lexperl |
---|
[14544] | 19 | bundled perl preprocessor/macro facility |
---|
| 20 | this would solve many of the syntactic nice-to-haves |
---|
| 21 | use posix calls internally where possible |
---|
| 22 | gettimeofday (possibly best left for a module?) |
---|
[10723] | 23 | format BOTTOM |
---|
| 24 | -i rename file only when successfully changed |
---|
[14544] | 25 | all ARGV input should act like <> |
---|
[10723] | 26 | report HANDLE [formats]. |
---|
| 27 | support in perlmain to rerun debugger |
---|
| 28 | regression tests using __DIE__ hook |
---|
| 29 | lexically scoped functions: my sub foo { ... } |
---|
[14544] | 30 | the basic concept is easy and sound, |
---|
| 31 | the difficulties begin with self-referential |
---|
| 32 | and mutually referential lexical subs: how to |
---|
| 33 | declare the subs? |
---|
| 34 | lexically scoped typeglobs? (lexical I/O handles work now) |
---|
| 35 | wantlvalue? more generalized want()/caller()? |
---|
| 36 | named prototypes: sub foo ($foo, @bar) { ... } ? |
---|
| 37 | regression/sanity tests for suidperl |
---|
| 38 | iterators/lazy evaluation/continuations/first/ |
---|
| 39 | first_defined/short-circuiting grep/?? |
---|
| 40 | This is a very thorny and hotly debated subject, |
---|
| 41 | tread carefully and do your homework first |
---|
| 42 | generalise Errno way of extracting cpp symbols and use that in |
---|
| 43 | Errno, Fcntl, POSIX (ExtUtils::CppSymbol?) |
---|
| 44 | the _r-problem: for all the {set,get,end}*() system database |
---|
| 45 | calls (and a couple more: readdir, *rand*, crypt, *time, |
---|
| 46 | tmpnam) there are in many systems the _r versions |
---|
| 47 | to be used in re-entrant (=multithreaded) code |
---|
| 48 | Icky things: the _r API is not standardized and |
---|
| 49 | the _r-forms require per-thread data to store their state |
---|
| 50 | memory profiler: turn malloc.c:Perl_get_mstats() into |
---|
| 51 | an extension (Devel::MProf?) that would return the malloc |
---|
| 52 | stats in a nice Perl datastructure (also a simple interface |
---|
| 53 | to return just the grand total would be good) |
---|
| 54 | cross-compilation support |
---|
| 55 | host vs target: compile in the host, get the executable to |
---|
| 56 | the target, get the possible input files to the target, |
---|
| 57 | execute in the target (and do not assume a UNIXish shell |
---|
| 58 | in the target! e.g. no command redirection can be assumed), |
---|
| 59 | get possible output files back to to host. this needs to work |
---|
| 60 | both during Configure and during the build. You cannot assume |
---|
| 61 | shared filesystems between the host and the target (you may need |
---|
| 62 | e.g. ftp), executing the target executable may involve e.g. rsh |
---|
| 63 | a way to make << and >> to shift bitvectors instead of numbers |
---|
[10723] | 64 | |
---|
| 65 | Possible pragmas |
---|
| 66 | debugger |
---|
[14544] | 67 | optimize (use less qw[memory cpu]) |
---|
[10723] | 68 | |
---|
| 69 | Optimizations |
---|
| 70 | constant function cache |
---|
| 71 | switch structures |
---|
| 72 | foreach(reverse...) |
---|
[14544] | 73 | cache eval tree (unless lexical outer scope used (mark in &compiling?)) |
---|
[10723] | 74 | rcatmaybe |
---|
[14544] | 75 | shrink opcode tables via multiple implementations selected in peep |
---|
| 76 | cache hash value? (Not a win, according to Guido) |
---|
| 77 | optimize away @_ where possible |
---|
| 78 | tail recursion removal |
---|
[10723] | 79 | "one pass" global destruction |
---|
[14544] | 80 | rewrite regexp parser for better integrated optimization |
---|
[10723] | 81 | LRU cache of regexp: foreach $pat (@pats) { foo() if /$pat/ } |
---|
| 82 | |
---|
| 83 | Vague possibilities |
---|
[14544] | 84 | ref function in list context? |
---|
[10723] | 85 | make tr/// return histogram in list context? |
---|
[14544] | 86 | loop control on do{} et al |
---|
| 87 | explicit switch statements |
---|
[10723] | 88 | built-in globbing |
---|
| 89 | compile to real threaded code |
---|
| 90 | structured types |
---|
| 91 | autocroak? |
---|
[14544] | 92 | modifiable $1 et al |
---|