Date: Tue, 12 Aug 2014 19:11:47 +0000 From: "Montgomery-Smith, Stephen" <stephen@missouri.edu> To: =?Windows-1252?Q?fran=E7ai_s?= <romapera15@gmail.com>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Re: The use of C language is avoided in FreeBSD development? Message-ID: <53EA66F1.3060609@missouri.edu> In-Reply-To: <CAK_6RweB=zecW3xm98G9CkGb1RdWwYEN5wkyrCBHVRyj0FNrag@mail.gmail.com> References: <CAK_6RweB=zecW3xm98G9CkGb1RdWwYEN5wkyrCBHVRyj0FNrag@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 08/12/2014 01:07 PM, fran=E7ai s wrote: > The use of C language is avoided in FreeBSD development? I ask this > because second Eric Raymond in 'How To Become A Hacker', actually, the > more you can avoid programming in C the more productive you will be. > reference:http://www.catb.org/~esr/faqs/hacker-howto.html I think Eric has a good point. First, this particular quote is part of a much longer essay which is well thought out and nuanced. He is definitely not saying you should avoid programming in C. Rather he is saying that if the task at hand is handled well by a different language, go ahead and use that instead. Let me say what I think Eric is trying to say, and back it up with lessons I learned. I learned programming in the 1970s and 1980s. I started with BASIC, then PASCAL, but then I settled on C. This is just the way things happened for me. I had my first unix computer in 1989 - it was a Sun workstation. I loved it. And my experience with C really helped me a lot. And in some ways, I have to say that I really began to appreciate how good a language C really is. But also, because I knew C, and nothing else (like awk, shell script, grep, etc), I got into the habit of doing every job using C. For example, I had these files which were padded with zeros at the end that made the file hundreds of times bigger, and the program that handled them a lot slower. So I wrote a C program that removed the trailing zeros. I another example, I helped organize a conference. I wrote software that processed the emails we received, and extracted information like the first name, last name, title of talk, abstract, etc. And it put all this information into a large TeX file that became the conference abstracts. And because the form they filled in was badly designed, the text was embedded into the emails in all kinds of awkward ways, so the program had to handle the many inconsistencies with how the forms had been filled out. And I wrote this whole program in C! Then someone recommended I learn PERL. I suddenly realized I had been using the wrong tool. PERL was tailor made for the conference task. And learning about regular expressions inspired me to learn at least a little bit about awk, grep and shell script. I now realize I was using C all the time for tasks for which it was completely inappropriate. I do very much appreciate the knowledge of C I have. And it is probably the language I know the best. But Eric is right. If there is a better language for the job, use that other language. Avoid C whenever it can be avoided. Don't avoid C when it cannot be avoided. Learn C, and learn it well. But Eric is completely correct. Stephen=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53EA66F1.3060609>