Commit | Line | Data |
7711098a |
1 | =head1 NAME |
2 | |
3 | perltodo - Perl TO-DO List |
4 | |
5 | =head1 DESCRIPTION |
e50bb9a1 |
6 | |
722d2a37 |
7 | This is a list of wishes for Perl. Send updates to |
e50bb9a1 |
8 | I<perl5-porters@perl.org>. If you want to work on any of these |
9 | projects, be sure to check the perl5-porters archives for past ideas, |
10 | flames, and propaganda. This will save you time and also prevent you |
11 | from implementing something that Larry has already vetoed. One set |
12 | of archives may be found at: |
13 | |
14 | http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/ |
15 | |
cd793d32 |
16 | =head1 assertions |
e50bb9a1 |
17 | |
cd793d32 |
18 | Clean up and finish support for assertions. See L<assertions>. |
e50bb9a1 |
19 | |
cd793d32 |
20 | =head1 iCOW |
e50bb9a1 |
21 | |
cd793d32 |
22 | Sarathy and Arthur have a proposal for an improved Copy On Write which |
23 | specifically will be able to COW new ithreads. If this can be implemented |
24 | it would be a good thing. |
e50bb9a1 |
25 | |
cd793d32 |
26 | =head1 (?{...}) closures in regexps |
4b3b956a |
27 | |
cd793d32 |
28 | Fix (or rewrite) the implementation of the C</(?{...})/> closures. |
4b3b956a |
29 | |
cd793d32 |
30 | =head1 pragmata |
e50bb9a1 |
31 | |
cd793d32 |
32 | =head2 lexical pragmas |
0562c0e3 |
33 | |
cd793d32 |
34 | Reimplement the mechanism of lexical pragmas to be more extensible. Fix |
35 | current pragmas that don't work well (or at all) with lexical scopes or in |
36 | run-time eval(STRING) (C<sort>, C<re>, C<encoding> for example). MJD has a |
37 | preliminary patch that implements this. |
0562c0e3 |
38 | |
cd793d32 |
39 | =head2 use less 'memory' |
f35392ae |
40 | |
cd793d32 |
41 | Investigate trade offs to switch out perl's choices on memory usage. |
42 | Particularly perl should be able to give memory back. |
f35392ae |
43 | |
cd793d32 |
44 | =head1 prototypes and functions |
c5fc23ff |
45 | |
cd793d32 |
46 | =head2 _ prototype character |
e50bb9a1 |
47 | |
cd793d32 |
48 | Study the possibility of adding a new prototype character, C<_>, meaning |
49 | "this argument defaults to $_". |
e50bb9a1 |
50 | |
cd793d32 |
51 | =head2 inlining autoloaded constants |
776f8809 |
52 | |
cd793d32 |
53 | Currently the optimiser can inline constants when expressed as subroutines |
54 | with prototype ($) that return a constant. Likewise, many packages wrapping |
55 | C libraries export lots of constants as subroutines which are AUTOLOADed on |
56 | demand. However, these have no prototypes, so can't be seen as constants by |
57 | the optimiser. Some way of cheaply (low syntax, low memory overhead) to the |
58 | perl compiler that a name is a constant would be great, so that it knows to |
59 | call the AUTOLOAD routine at compile time, and then inline the constant. |
776f8809 |
60 | |
cd793d32 |
61 | =head2 Finish off lvalue functions |
e50bb9a1 |
62 | |
cd793d32 |
63 | The old perltodo notes "They don't work in the debugger, and they don't work for |
64 | list or hash slices." |
e50bb9a1 |
65 | |
cd793d32 |
66 | =head1 Unicode and UTF8 |
e50bb9a1 |
67 | |
cd793d32 |
68 | =head2 Implicit Latin 1 => Unicode translation |
e50bb9a1 |
69 | |
cd793d32 |
70 | Conversions from byte strings to UTF-8 currently map high bit characters |
71 | to Unicode without translation (or, depending on how you look at it, by |
72 | implicitly assuming that the byte strings are in Latin-1). As perl assumes |
73 | the C locale by default, upgrading a string to UTF-8 may change the |
74 | meaning of its contents regarding character classes, case mapping, etc. |
75 | This should probably emit a warning (at least). |
e50bb9a1 |
76 | |
cd793d32 |
77 | =head2 UTF8 caching code |
e50bb9a1 |
78 | |
cd793d32 |
79 | The string position/offset cache is not optional. It should be. |
e50bb9a1 |
80 | |
938c8732 |
81 | =head2 Unicode in Filenames |
82 | |
83 | chdir, chmod, chown, chroot, exec, glob, link, lstat, mkdir, open, |
84 | opendir, qx, readdir, readlink, rename, rmdir, stat, symlink, sysopen, |
85 | system, truncate, unlink, utime, -X. All these could potentially accept |
86 | Unicode filenames either as input or output (and in the case of system |
87 | and qx Unicode in general, as input or output to/from the shell). |
88 | Whether a filesystem - an operating system pair understands Unicode in |
89 | filenames varies. |
90 | |
91 | Known combinations that have some level of understanding include |
92 | Microsoft NTFS, Apple HFS+ (In Mac OS 9 and X) and Apple UFS (in Mac |
93 | OS X), NFS v4 is rumored to be Unicode, and of course Plan 9. How to |
94 | create Unicode filenames, what forms of Unicode are accepted and used |
95 | (UCS-2, UTF-16, UTF-8), what (if any) is the normalization form used, |
96 | and so on, varies. Finding the right level of interfacing to Perl |
97 | requires some thought. Remember that an OS does not implicate a |
98 | filesystem. |
99 | |
100 | (The Windows -C command flag "wide API support" has been at least |
101 | temporarily retired in 5.8.1, and the -C has been repurposed, see |
102 | L<perlrun>.) |
103 | |
104 | =head2 Unicode in %ENV |
105 | |
106 | Currently the %ENV entries are always byte strings. |
107 | |
cd793d32 |
108 | =head1 Regexps |
e50bb9a1 |
109 | |
cd793d32 |
110 | =head2 regexp optimiser optional |
e50bb9a1 |
111 | |
cd793d32 |
112 | The regexp optimiser is not optional. It should configurable to be, to allow |
113 | its performance to be measured, and its bugs to be easily demonstrated. |
e50bb9a1 |
114 | |
938c8732 |
115 | =head2 common suffices/prefices in regexps (trie optimization) |
c47ff5f1 |
116 | |
722d2a37 |
117 | Currently, the user has to optimize C<foo|far> and C<foo|goo> into |
118 | C<f(?:oo|ar)> and C<[fg]oo> by hand; this could be done automatically. |
e50bb9a1 |
119 | |
cd793d32 |
120 | =head1 POD |
e50bb9a1 |
121 | |
cd793d32 |
122 | =head2 POD -> HTML conversion still sucks |
e50bb9a1 |
123 | |
938c8732 |
124 | Which is crazy given just how simple POD purports to be, and how simple HTML |
125 | can be. |
126 | |
cd793d32 |
127 | =head1 Misc medium sized projects |
e50bb9a1 |
128 | |
cd793d32 |
129 | =head2 UNITCHECK |
e50bb9a1 |
130 | |
cd793d32 |
131 | Introduce a new special block, UNITCHECK, which is run at the end of a |
132 | compilation unit (module, file, eval(STRING) block). This will correspond to |
133 | the Perl 6 CHECK. Perl 5's CHECK cannot be changed or removed because the |
134 | O.pm/B.pm backend framework depends on it. |
e50bb9a1 |
135 | |
cd793d32 |
136 | =head2 optional optimizer |
e50bb9a1 |
137 | |
cd793d32 |
138 | Make the peephole optimizer optional. |
e50bb9a1 |
139 | |
cd793d32 |
140 | =head2 lexical aliases |
e50bb9a1 |
141 | |
cd793d32 |
142 | Allow lexical aliases (maybe via the syntax C<my \$alias = \$foo>. |
e50bb9a1 |
143 | |
cd793d32 |
144 | =head2 no 6 |
e50bb9a1 |
145 | |
cd793d32 |
146 | Make C<no 6> and C<no v6> work (opposite of C<use 5.005>, etc.). |
e50bb9a1 |
147 | |
cd793d32 |
148 | =head2 IPv6 |
3958b146 |
149 | |
cd793d32 |
150 | Clean this up. Check everything in core works |
e50bb9a1 |
151 | |
cd793d32 |
152 | =head2 entersub XS vs Perl |
e50bb9a1 |
153 | |
cd793d32 |
154 | At the moment pp_entersub is huge, and has code to deal with entering both |
155 | perl and and XS subroutines. Subroutine implementations rarely change between |
156 | perl and XS at run time, so investigate using 2 ops to enter subs (one for |
157 | XS, one for perl) and swap between if a sub is redefined. |
e50bb9a1 |
158 | |
cd793d32 |
159 | =head2 @INC source filter to Filter::Simple |
e50bb9a1 |
160 | |
cd793d32 |
161 | The second return value from a sub in @INC can be a source filter. This isn't |
162 | documented. It should be changed to use Filter::Simple, tested and documented. |
e50bb9a1 |
163 | |
cd793d32 |
164 | =head2 bincompat functions |
e50bb9a1 |
165 | |
cd793d32 |
166 | There are lots of functions which are retained for binary compatibility. |
167 | Clean these up. Move them to mathom.c, and don't compile for blead? |
e50bb9a1 |
168 | |
722d2a37 |
169 | =head2 Use fchown/fchmod internally |
e50bb9a1 |
170 | |
cd793d32 |
171 | The old perltodo notes "This has been done in places, but needs a thorough |
172 | code review. Also fchdir is available in some platforms." |
e50bb9a1 |
173 | |
cd793d32 |
174 | =head2 foreach reverse |
e50bb9a1 |
175 | |
cd793d32 |
176 | The old perltodo notes that we could optimise foreach to iterate in reverse. |
177 | (instead of making a reversed copy on the stack) |
e50bb9a1 |
178 | |
cd793d32 |
179 | =head1 Tests |
e50bb9a1 |
180 | |
cd793d32 |
181 | =head2 Make Schwern poorer |
e50bb9a1 |
182 | |
cd793d32 |
183 | Tests for everything, At which point Schwern coughs up $500 to TPF. |
e50bb9a1 |
184 | |
cd793d32 |
185 | =head2 test B |
722d2a37 |
186 | |
cd793d32 |
187 | A test suite for the B module would be nice. |
722d2a37 |
188 | |
cd793d32 |
189 | =head2 Improve tests for Config.pm |
e50bb9a1 |
190 | |
cd793d32 |
191 | Config.pm doesn't appear to be well tested. |
e50bb9a1 |
192 | |
cd793d32 |
193 | =head2 common test code for timed bailout |
e50bb9a1 |
194 | |
cd793d32 |
195 | Write portable self destruct code for tests to stop them burning CPU in |
196 | infinite loops. Needs to avoid using alarm, as some of the tests are testing |
197 | alarm/sleep or timers. |
e50bb9a1 |
198 | |
cd793d32 |
199 | =head1 Installation |
e50bb9a1 |
200 | |
cd793d32 |
201 | =head2 compressed man pages |
e50bb9a1 |
202 | |
cd793d32 |
203 | Be able to install them |
e50bb9a1 |
204 | |
cd793d32 |
205 | =head2 Make Config.pm cope with differences between build and installed perl |
e50bb9a1 |
206 | |
cd793d32 |
207 | =head2 Relocatable perl |
e50bb9a1 |
208 | |
cd793d32 |
209 | Make it possible to create a relocatable perl binary. Will need some collusion |
210 | with Config.pm. We could use a syntax of ... for location of current binary? |
e50bb9a1 |
211 | |
cd793d32 |
212 | =head2 make HTML install work |
e50bb9a1 |
213 | |
cd793d32 |
214 | =head1 Incremental things |
e50bb9a1 |
215 | |
cd793d32 |
216 | Some tasks that don't need to get done in one big hit. |
e50bb9a1 |
217 | |
cd793d32 |
218 | =head2 autovivification |
e50bb9a1 |
219 | |
cd793d32 |
220 | Make all autovivification consistent w.r.t LVALUE/RVALUE and strict/no strict; |
e50bb9a1 |
221 | |
cd793d32 |
222 | =head2 fix tainting bugs |
e50bb9a1 |
223 | |
cd793d32 |
224 | Fix the bugs revealed by running the test suite with the C<-t> switch (via |
225 | C<make test.taintwarn>). |
e50bb9a1 |
226 | |
cd793d32 |
227 | =head2 Make tainting consistent |
e50bb9a1 |
228 | |
cd793d32 |
229 | Tainting would be easier to use if it didn't take documented shortcuts and allow |
230 | taint to "leak" everywhere within an expression. |
e50bb9a1 |
231 | |
cd793d32 |
232 | =head1 Vague things |
e50bb9a1 |
233 | |
cd793d32 |
234 | Some more nebulous ideas |
e50bb9a1 |
235 | |
cd793d32 |
236 | =head2 threads |
e50bb9a1 |
237 | |
cd793d32 |
238 | Make threads more robust. |
e50bb9a1 |
239 | |
cd793d32 |
240 | =head2 POSIX memory footprint |
e50bb9a1 |
241 | |
cd793d32 |
242 | Ilya observed that use POSIX; eats memory like there's no tomorrow, and at |
243 | various times worked to cut it down. There is probably still fat to cut out - |
244 | for example POSIX passes Exporter some very memory hungry data structures. |
e50bb9a1 |
245 | |
cd793d32 |
246 | =head2 Optimize away @_ |
f86a8bc5 |
247 | |
cd793d32 |
248 | The old perltodo notes "Look at the "reification" code in C<av.c>" |
3298bd4d |
249 | |
cd793d32 |
250 | =head2 switch ops |
3298bd4d |
251 | |
cd793d32 |
252 | The old perltodo notes "Although we have C<Switch.pm> in core, Larry points to |
253 | the dormant C<nswitch> and C<cswitch> ops in F<pp.c>; using these opcodes would |
254 | be much faster." |
0562c0e3 |
255 | |
cd793d32 |
256 | ** Attach/detach debugger from running program |
1626a787 |
257 | |
cd793d32 |
258 | The old perltodo notes "With C<gdb>, you can attach the debugger to a running |
259 | program if you pass the process ID. It would be good to do this with the Perl |
260 | debugger on a running Perl program, although I'm not sure how it would be done." |
261 | ssh and screen do this with named pipes in tmp. Maybe we can too. |
1626a787 |
262 | |