TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Fidonet C Echo
from: Bob Stout
date: 2003-09-22 14:11:22
subject: rmtrail() variants

From: rbs{at}snippets.org
To: c_echo{at}yahoogroups.com
Copy: c{at}snippets.org (C List)

I inadvertently deleted some messages relating to this thread - initially
a discussion of ini.c from SNIPPETS.

All of the points in this thread have been well taken. Taking the larger
view, something should be obvious. One hazard of a compact, terse language
like C is that programmers find themselves in "Name That Tune" style
contests for bragging rights to the tersest code. (If you're too young to
remember "Name That Tune", don't worry about it - it was an old radio, and
later TV, game show.)

The point is that after the first few postings, most of the effort went
into making the code visibly smaller. The difference in timing between the
slowest and fastest is probably inconsequential for most applications. The
function, trimming trailing whitespace from a string, is furthermore an
almost ideal example of a function that, if it's too slow, should be
rewritten in assembly for maximum improvement.

Given this perspective, I'd argue that the code that is most readable with
the most obvious algorithm should be preferred, based solely on its
maintainability.

-------------------------------------------------------------
Consulting: http://www.MicroFirm.biz/
Web graphics development: http://Image-Magicians.com/
Software archives: http://snippets.snippets.org/
  c.snippets.org/   cpp.snippets.org/      java.snippets.org/
  d.snippets.org/   python.snippets.org/   perl.snippets.org/
  dos.snippets.org/ embedded.snippets.org/ apps.snippets.org/
Audio and loudspeaker design:
  http://LDSG.snippets.org/   http://www.diyspeakers.net/

--- SoupGate-Win32 v1.05
* Origin: rbs{at}snippets.org (2:292/516.666)
SEEN-BY: 633/267 270
@PATH: 292/516 854 140/1 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.