From owner-freebsd-questions@FreeBSD.ORG Thu Feb 3 12:54:10 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A27116A4CE for ; Thu, 3 Feb 2005 12:54:10 +0000 (GMT) Received: from dexter.starfire.mn.org (starfire.skypoint.net [66.93.17.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 73B5343D2F for ; Thu, 3 Feb 2005 12:54:09 +0000 (GMT) (envelope-from john@dexter.starfire.mn.org) Received: (from john@localhost) by dexter.starfire.mn.org (8.11.3/8.11.3) id j13Cs7A30199; Thu, 3 Feb 2005 06:54:07 -0600 (CST) (envelope-from john) Date: Thu, 3 Feb 2005 06:54:07 -0600 From: John To: Jay Moore Message-ID: <20050203065407.B30179@starfire.mn.org> References: <20050201164337.GA78979@dogma.freebsd-uk.eu.org> <200502030521.41528.jaymo@cromagnon.cullmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200502030521.41528.jaymo@cromagnon.cullmail.com>; from jaymo@cromagnon.cullmail.com on Thu, Feb 03, 2005 at 05:21:41AM -0600 cc: freebsd-questions@freebsd.org cc: Jonathon McKitrick Subject: Re: Unix equivalent of a variant?? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Feb 2005 12:54:10 -0000 On Thu, Feb 03, 2005 at 05:21:41AM -0600, Jay Moore wrote: > On Tuesday 01 February 2005 10:43 am, Jonathon McKitrick wrote: > > Hey everyone, > > > > I'm finally doing something very exciting here at work: porting software to > > Unix! > > > > I need the equivalent of a variant, however. A hold-everything variable > > that can be any type in C/C++. Is there something already out there I can > > use or should I just roll my own? > > I think you should read and understand MS' documentation on the variant data > type before you spend much time trying to code this for *nix. IIRC, the > Variant data type is limited to development environments like "Visual Basic". > I'm thinking there must be an awful lot of overhead associated with handling > a "Variant" data type, as every use of it must figure out what the "real" > datat type is. I don't know what your objective is, and certainly don't > pretend to tell you this shouldn't be done, but - just because MS has done > it, does not mean it is a good thing to do in general. Or, just use PERL. :) -- John Lind john@starfire.MN.ORG