Mercurial > docs > master
comparison discussion.roff @ 145:3361e53dfcd6
Added comments and a source quote.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Thu, 05 Jul 2012 16:39:01 +0200 |
parents | b7b81ae9c9d8 |
children | 63e885fb48ba |
comparison
equal
deleted
inserted
replaced
144:335f011e8271 | 145:3361e53dfcd6 |
---|---|
2770 The code did not match the expectation the function suggested, | 2770 The code did not match the expectation the function suggested, |
2771 as it, for whatever reason, only compared the first ten characters | 2771 as it, for whatever reason, only compared the first ten characters |
2772 of the charset name. | 2772 of the charset name. |
2773 .P | 2773 .P |
2774 More important than using active names is using descriptive names. | 2774 More important than using active names is using descriptive names. |
2775 Renaming the obscure function | 2775 .VS |
2776 m_unknown(in); /* the MAGIC invocation... */ | |
2777 VE | |
2778 Renaming the obscure | |
2776 .Fu m_unknown() | 2779 .Fu m_unknown() |
2777 was a delightful event. | 2780 function was a delightful event, although it made the code less funny. |
2778 .Ci 611d68d19204d7cbf5bd585391249cb5bafca846 | 2781 .Ci 611d68d19204d7cbf5bd585391249cb5bafca846 |
2779 .P | 2782 .P |
2780 Magic numbers are generally considered bad style. | 2783 Magic numbers are generally considered bad style. |
2781 Obviously, Kernighan and Pike agree: | 2784 Obviously, Kernighan and Pike agree: |
2782 ``Give names to magic numbers''. | 2785 ``Give names to magic numbers''. |
3908 The decrease of tools built from multiple source files and thus | 3911 The decrease of tools built from multiple source files and thus |
3909 the decrease of | 3912 the decrease of |
3910 .Fn uip/*sbr.c | 3913 .Fn uip/*sbr.c |
3911 files confirm the improvement. | 3914 files confirm the improvement. |
3912 .P | 3915 .P |
3916 .\" XXX move this paragraph up somewhere | |
3913 One disadvantage needs to be taken with this change: | 3917 One disadvantage needs to be taken with this change: |
3914 The compiler can no longer check the integrity of the interfaces. | 3918 The compiler can no longer check the integrity of the interfaces. |
3915 By changing the command line interfaces of tools, it is | 3919 By changing the command line interfaces of tools, it is |
3916 the developer's job to adjust the invocations of these tools as well. | 3920 the developer's job to adjust the invocations of these tools as well. |
3917 As this is a manual task and regression tests, which could detect such | 3921 As this is a manual task and regression tests, which could detect such |
3918 problems, are not available yet, it is prone to errors. | 3922 problems, are not available yet, it is prone to errors. |
3919 These errors will not be detected at compile time but at run time. | 3923 These errors will not be detected at compile time but at run time. |
3920 Installing regression tests is a task left to do. | 3924 Installing regression tests is a task left to do. |
3921 In the best case, a uniform way of invoking tools from other tools | 3925 In the best case, a uniform way of invoking tools from other tools |
3922 can be developed to allow automated testing at compile time. | 3926 can be developed to allow automated testing at compile time. |
3927 | |
3928 | |
3929 .ig | |
3930 XXX consider writing about mhl vs. mhlproc | |
3931 | |
3932 sbr/showfile.c | |
3933 | |
3934 23 /* | |
3935 24 ** If you have your lproc listed as "mhl", | |
3936 25 ** then really invoked the mhlproc instead | |
3937 26 ** (which is usually mhl anyway). | |
3938 27 */ | |
3939 | |
3940 Sat Nov 24 19:09:14 1984 /mtr (agent: Marshall Rose) <uci@udel-dewey> | |
3941 | |
3942 sbr/showfile.c: if lproc is "mhl", use mhlproc for consistency | |
3943 (Actually, user should use "lproc: show", "showproc: mhl".) | |
3944 .. |