From owner-freebsd-questions@FreeBSD.ORG Sun Oct 7 17:55:02 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A99B16A41B for ; Sun, 7 Oct 2007 17:55:02 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.freebsd.org (Postfix) with ESMTP id B8A5B13C4A5 for ; Sun, 7 Oct 2007 17:55:01 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from epia-2.farid-hajji.net (epia-2 [192.168.254.11]) by fw.farid-hajji.net (Postfix) with ESMTP id E11C6DCC67; Sun, 7 Oct 2007 19:54:59 +0200 (CEST) Date: Sun, 7 Oct 2007 19:54:57 +0200 From: cpghost To: Roland Smith Message-ID: <20071007195457.5fa86514@epia-2.farid-hajji.net> In-Reply-To: <20071007150830.GC84686@slackbox.xs4all.nl> References: <972994690710061253q483e26ber68f4716d3202d1fa@mail.gmail.com> <20071006201356.GB55336@slackbox.xs4all.nl> <20071006163312.GB61195@demeter.hydra> <20071007150830.GC84686@slackbox.xs4all.nl> Organization: Cordula's Web X-Mailer: Claws Mail 3.0.1 (GTK+ 2.10.14; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: James Jeffery , freebsd-questions@freebsd.org Subject: Re: C++ Compiler On FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2007 17:55:02 -0000 On Sun, 7 Oct 2007 17:08:30 +0200 Roland Smith wrote: > My preference for doing things is; > > 1) Can it be done with a shell-script? (esp. one-time hacks) > 2) Else use Perl, Octave, Ruby, but > 3) If speed is key, use C. :-) Yup, exactly. In Python, that's what extension modules in C and C++ are for (ditto for Perl, Ruby, ...). You gain raw speed for CPU bottlenecks, though that's just a nice side effect. More importantly, you can tap into existing C/C++ libraries by wrapping their interfaces into nice extension modules. And if you're too lazy do do the wrapping against Python, Ruby, Perl... APIs yourself, just use something like SWIG. It works like a charm. :) Anyway, having a working knowledge of C and C++ is always a very good idea! Go for it! It'll pay off, whatever your main programming language. -cpghost. -- Cordula's Web. http://www.cordula.ws/