× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



In the old 8086/80286 days of PC's, I could (somewhat) understand
worrying about cycles.  I remember the discussions of "should I shift
left to multiply by 2 instead of *2", the comparison of the various C
compilers at the time (who remembers Lattice?), and that sort of thing. 
Nowadays, while not condoning lazy programming, why worry about a couple
of CPU cycles?  The optimizer can deal with that minutiae.  Again, I'll
trade readability over a couple of cycles.  

Ageed that it's probably easier for the compiler to be more efficient
with certain constructs, but the blanket statement that C is more
efficient shouldn't be taken at face value.  You really don't know what
the compiler has turned your construct into. 



AGlauser@xxxxxxxxxxxx 12/13/2006 11:22:46 AM >>>
Adam Glauser wrote:
var1   = (eval var2 = value)

That little eval is rather important, and I'm in agreement as well
that 
this is not something that should be used frequently.

Roger Harman wrote on 13/12/2006 02:11:19 PM:

Or maybe not used at all.  The nested eval is not all intuitive. 
I'll
take repetitive lines of code over that any day.

From the classic  "The Elements of Programming Style"..
   Write clearly - don't be too clever

I agree.  The only reason I could see to use the nested structure is
that 
it might save a few cycles.  Sometimes that is the case with similar 
constructs in C.  Of course, if you really need uber-efficiency that 
badly, C is probably a better bet anyway.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.