[Date Index] [Thread Index] [Author Index]
Re: Conventional way of doing "struct"-like things?
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