Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Conventional way of doing "struct"-like things?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104603] Re: Conventional way of doing "struct"-like things?
  • From: Erik Max Francis <max at alcyone.com>
  • Date: Wed, 4 Nov 2009 01:40:57 -0500 (EST)
  • References: <200911012255.RAA12068@smc.vnet.net> <hconio$1bm$1@smc.vnet.net>

danl at wolfram.com wrote:
> I cannot say authoritatively what is "best practice" here. It tends to
> vary  amongst different programmers and different needs.
> 
> I will point out that using definitions such as lattitude[x_] is a common
> approach to making this not depend on internal details of your indexing. I
> certainly would encourage that for anything larger than a small project.
> Use of symbolic names for the indices can also help a bit to isolate low
> level details from higher level code. Makes code packaging and 
> maintainance much easier. Also makes it to a greater extent
> self-documenting.
> 
> There may be other ways to go about this sort of code modularization that
> either augment or avoid the ones you note, but if so I'm not seeing them
> at the moment.

Thanks for your input.  This was pretty much my suspicion, but I figured 
it couldn't hurt to ask to make sure there wasn't something I wasn't 
missing.

-- 
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
  San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
   Every human being is a problem in search of a solution.
    -- Ashley Montague


  • Prev by Date: Re: Multi-variable first-order perturbation analysis?
  • Next by Date: Re: Finding Clusters
  • Previous by thread: Re: Conventional way of doing "struct"-like things?
  • Next by thread: Re: Conventional way of doing "struct"-like things?