On Wed, May 09, 2007 at 10:56:57AM +0200, Joachim Schipper wrote:
> On Tue, May 08, 2007 at 09:34:35PM -0400, Douglas Allan Tutty wrote:
> > On Tue, May 08, 2007 at 01:22:10PM -0700, Bryan Irvine wrote:
> >  
> > > I need a fairly simple menu, and have thought about just simple
> > > selects but figured now would also be a good time to learn something
> > > new as well.  It's nothing so complex that I need to go ncurses to do.
> > > Just a basic <option 1> then <option 3> then <run some command>
> > > thing.
> > 
> > My front-ends I do in python.  It doesn't have a case/select.  I just
> > use if/then/elif/....
> > 
> > Then there's Fortran with computed gotos; very slick.  I forget the
> > syntax but is something like goto (10+choice)
> > for each choice until one matches.
> 
> Just pointing out: if Python can do the job at all, you almost certainly
> don't need that kind of micro-optimization in Fortran code. Also, this
> is a menu. Efficiency is not exactly a big goal.

I don't do enough programming to want to keep track of multiple
languages.  If I have to read a program in 10 years I want to know what
its trying to do.  C has too much punctuation everywhere.   So I only
program in Python and Fortran.  

> 
> However, and this is where I go completely off-topic, while we're at it,
> you don't need Fortran for this, most languages have equivalent
> constructs (C):
> 
 
> In languages with higher order-functions, this can be written even more
> concisely (Scheme):
 
> However, all of this is massively overkill. Just use a shell script.

Shell is too much like C (punctuation and spacing matter).  (sorry if
this sounds anti-unix).  I use shell if its like a dos bat file,
sequential.  Once I have to test conditions and branch I switch to
python.  Then if something takes a long time (or I know it will before
hand), I use fortran 77.

Unfortunaly, I can't get my head around regex either.  Two hours after
I'v written it I can't understand it.  So I code it in python or
fortran.

Doug.

Reply via email to