Re: man 3 switch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/14/09 13:54, quoth Frank Cox:
> On Sat, 14 Nov 2009 14:15:22 -0430
> Patrick O'Callaghan wrote:
> 
>> Moreover, IMHO documenting language keywords
>> via man pages as they are traditionally understood would be next to
>> useless. 
> 
> *blink*
> 
> "man switch" tells me all about the "TCL Built-In Command" called switch.
> 
> So the built-in TCL keyword is entitled to a man page but the C keyword is not?
> 
> Are you saying that you think the TCL Built-In Commands man pages should be
> removed?
> 

For starters, you should understand that tcl is a *very* small language which
is extensible. C is not an extensible language. lisp is another example of an
extensible language. (How do you think that list allows short circuiting of
and/or logic if it's normal for all args to be eval'd before calling the
function?)

For example, the lowly if statement in tcl is not a part of the base grammar
of the tcl language. In fact, it is an extension, just the same way that the
expect statement and all of its friends are further extension to the tcl
language. That's right Virginia, expect is not a language. It's another
extension to tcl. I'd have to look around, but I suspect that the switch
statement in tcl is also an extension.

There's nothing wrong with perl having all kinds of perldoc pages. But perl
comes from one place. C, OTOH could come from lots of places besides FSF and
the switch statement in gcc may not be exactly the same as the switch
statement in some other dialect.

The size of a language has a metric. Some languages are bigger than others. It
makes sense that gcc (which version) does not have a man page for the switch
keyword in the section that deals with library calls. C is a smaller language
than something like PL1, ada, Fortran, COBOL, and lots of other things. There
are languages that are smaller than C.

There are lots of things that need to be done in this world. Creating a man
page for some version of some dialect of some compiler's switch statement is
way down on the list. Let's talk about foreskins instead. How many people are
even aware of the fact that an uncircumcised male is eight times more likely
to contract HIV than a circumcised male. (Wait, did I just start ranting?) But
my point is still the same: Section 3 is used for documenting library calls
and has very little (no wait, NOTHING) to do with the C language. The info
pages are already there and give complete documentation on the gcc compiler
that you have installed. In fact, there are scads of references to all of the
intricacies of the switch statement throughout the info section for gcc, such
that you could really spend a lot of time really enjoying the fine authorship
of this work. In fact, you *could* even run texi2dvi on the gcc.texi file and
print the whole thing out as a publication quality document. It might be close
to 1000 pages? I haven't looked. Go ahead, take a poke at it, see how big it
is. Read it and see how much sense it makes to write a man page for the switch
statement. Seriously. If you really want to know about the switch statement
then that's the place to go. OTOH, if all you want is the grammar for the
switch statement then you can study the bison code for the compiler. Lot's of
people did a lot of work to get this compiler to where it is.

I'm just glad we *have* reserved words. Remember the good old days when people
didn't know how to design languages? Here are two to ponder:

PL/I. No reserved words.

if (if == then);
then;
   then = else;
else;
   else = if;
end; /* Disclaimer: grammar may be off a bit. */

Or my personal favorite, in Fortran.

      DO 10 I = 1,100

There are no spaces in Fortran so what the compiler really sees is
      DO10I=1,100

The parser calls the scanner and sees a D and then an O. Do we have a DO
keyword or a variable that begins with DO? Then we see a 1 and a 0. Do we have
a DO 10 or a variable that begins with DO10? Then we see an I. Same question
but now it's a choice of DO 10 I or DO10I. Not till we see the COMMA do we
know that we have a DO loop and the scanner gets to return a DO token. And
don't forget that the I and the 1 can each be  huge function calls and
multi-dimensional array references that could go on for many many cards.

Yes, we live in amazing times where there is no man 3 switch. Somebody should
DO10I=1,100 something about this. Somebody, take care of this by noon tomorrow
or there shall be a letter in the Times.

-- 
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux