From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 12 19:12:59 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 372B41AD for ; Tue, 12 Aug 2014 19:12:59 +0000 (UTC) Received: from um-tip2-missouri-out.um.umsystem.edu (um-tip2-missouri-out.um.umsystem.edu [198.209.49.149]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "um-tip1.um.umsystem.edu", Issuer "InCommon Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E264A2269 for ; Tue, 12 Aug 2014 19:12:58 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhoFABxm6lPPoJ7S/2dsb2JhbABaFoJ3UlcEzS+HSAGBFBZ3hAQBBWgFCxECAQgYCRYPCQMCAQIBICUCBAEMCAEBBYg5DbctiQ+EbBeJf4UaNQWETAWRHaAag1xsAYFH X-IPAS-Result: AhoFABxm6lPPoJ7S/2dsb2JhbABaFoJ3UlcEzS+HSAGBFBZ3hAQBBWgFCxECAQgYCRYPCQMCAQIBICUCBAEMCAEBBYg5DbctiQ+EbBeJf4UaNQWETAWRHaAag1xsAYFH Received: from um-ncas5.um.umsystem.edu ([207.160.158.210]) by um-tip2-exch-relay.um.umsystem.edu with ESMTP; 12 Aug 2014 14:11:47 -0500 Received: from UM-MBX-N02.um.umsystem.edu ([169.254.5.145]) by UM-NCAS5.um.umsystem.edu ([207.160.158.210]) with mapi id 14.03.0181.006; Tue, 12 Aug 2014 14:11:47 -0500 From: "Montgomery-Smith, Stephen" To: =?Windows-1252?Q?fran=E7ai_s?= , "freebsd-hackers@freebsd.org" Subject: Re: The use of C language is avoided in FreeBSD development? Thread-Topic: The use of C language is avoided in FreeBSD development? Thread-Index: AQHPtlrNMuqW+YKTIUiiFfka1y5fmJvNqZ+A Date: Tue, 12 Aug 2014 19:11:47 +0000 Message-ID: <53EA66F1.3060609@missouri.edu> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.0 x-originating-ip: [207.160.158.194] Content-Type: text/plain; charset="Windows-1252" Content-ID: <81ABE26245A924448169AA43087354FB@missouri.edu> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 19:12:59 -0000 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=