MathGroup Archive 2003

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

Search the Archive

Re: Re: Re: Opinions about the "Oneliners"

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40636] Re: [mg40580] Re: [mg40453] Re: Opinions about the "Oneliners"
  • From: Dr Bob <majort at cox-internet.com>
  • Date: Fri, 11 Apr 2003 02:05:55 -0400 (EDT)
  • References: <b6e7j6$85b$1@smc.vnet.net> <200304060834.EAA01872@smc.vnet.net> <200304100742.DAA24305@smc.vnet.net>
  • Reply-to: majort at cox-internet.com
  • Sender: owner-wri-mathgroup at wolfram.com

Doing it in one line isn't the point.

Do, While, and For are often the least efficient (slowest) way to do things 
in terms of execution time.  We see this time after time in our function 
wars.

Bobby

On Thu, 10 Apr 2003 03:42:06 -0400 (EDT), David Terr <dterr at wolfram.com> 
wrote:

> nafod40 wrote:
>
>> Gerry Flanagan wrote:
>>
>>> Actually, this is a pretty serious problem. We've been trying to make 
>>> Mathematica a standard language for our engineering firm, but I've 
>>> struggled for years with developing good documentation standards. The 
>>> problem is that I have a couple of people that can program in 
>>> Mathematica style - very compact functional form, but the people that 
>>> don't use Mathematica everyday can never parse how the functions work.
>>>
>>
>> Ditto for us. The oneliners are clever tricks, but they are essentially 
>> opaque. A thick one liner can take even a decent (by our standards) 
>> Mathematica programmer far too long to understand.
>>
> I'll second that! During my 3 years at WRI, I've written essentially all 
> my Mathematica program in C style, i.e. using If, For, and While loops, 
> to make it look more like C. Very few of the functions I've written are 
> just one line, though I'm sure some clever Mathematica programmers could 
> make much of my code quite a bit shorter, perhaps turning many of my 
> functions into "Oneliners".
>
>>
>> I'm a big fan of using typography
>>
>>> (indenting and other visual aids) in programming, but Mathematica makes 
>>> even those methods difficult. I'm tempted to ban prefix and postfix 
>>> notation in packages because they can make for very opaque code.
>>>
>>
>> Another roadblock to those methods is that math typesetting and things 
>> like special fonts, font colors, and embedded comments play havoc with 
>> Mathematica's package autogeneration capability. It's been that way 
>> since version 3. I don't understand why they leave those bugs in.
>>
>>
>
>
>
>
>



-- 
majort at cox-internet.com
Bobby R. Treat



  • Prev by Date: Re: Integration problem
  • Next by Date: Re: split a list
  • Previous by thread: Re: Re: Opinions about the "Oneliners"
  • Next by thread: Re: Opinions about the "Oneliners"