From: ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe)
Subject: Re: Looking for a good Ada 95 book
Date: 1996/11/19
Date: 1996-11-19T00:00:00+00:00 [thread overview]
Message-ID: <56rhb5$rua$1@goanna.cs.rmit.edu.au> (raw)
In-Reply-To: 3290C33B.1772@cse.eng.lmu.edu
Ray Toal <rtoal@cse.eng.lmu.edu> writes:
>My experience has been totally the opposite. Students can adapt
>easily to different styles.
Could you send some of your students here, PLEASE?
I could do with students like that, really I could.
>Consistency is a big deal - you wouldn't wnat to sprinkle lots of
>underscores in C code because the standard library avoids them,
This is argument is riddled with flaws.
(1) Many people *DO* use lots of underscores in C code.
Just about everyone who hasn't been brainwashed into using
"Hungarian" notation, anyway.
(2) The standard library does NOT avoid underscores.
Here is a partial list of identifiers in the ISO standard C library
that contain underscores:
FLT_ROUNDS FLT_RADIX FLT_DIG FLT_EPSILON FLT_MANT_DIG FLT_MAX
FLT_MAX_10_EXP FLT_MAX_EXP FLT_MIN FLT_MIN_10_EXP FLT_MIN_EXP DBL_DIG
DBL_EPSILON DBL_MANT_DIG DBL_MAX DBL_MAX_10_EXP DBL_MAX_EXP DBL_MIN
DBL_MIN_10_EXP DBL_MIN_EXP LDBL_MANT_DIG LDBL_EPSILON LDBL_DIG
LDBL_MIN_EXP LDBL_MIN LDBL_MIN_10_EXP LDBL_MAX_EXP LDBL_MAX
LDBL_MAX_10_EXP CHAR_BIT MB_LEN_MAX UCHAR_MAX USHRT_MAX UINT_MAX
ULONG_MAX CHAR_MAX SCHAR_MAX SHRT_MAX INT_MAX LONG_MAX CHAR_MIN
SCHAR_MIN SHRT_MIN INT_MIN LONG_MIN LC_ALL LC_COLLATE LC_CTYPE
LC_MONETARY LC_NUMERIC LC_TIME decimal_point thousands_sep
int_curr_symbol currency_symbol mon_decimal_point mon_thousands_sep
mon_grouping positive_sign negative_sign int_frac_digits frac_digits
p_cs_precedes p_sep_by_space n_cs_precedes n_sep_by_space p_sign_posn
n_sign_posn jmp_buf sig_atomic_t SIG_DFL SIG_ERR SIG_IGN va_list
va_start va_end va_arg ptrdiff_t size_t wchar_t FILENAME_MAX FOPEN_MAX
fpos_t L_tmpnam SEEK_CUR SEEK_END SEEK_SET EXIT_FAILURE EXIT_SUCCESS
MB_CUR_MAX RAND_MAX div_t ldiv_t clock_t time_t tm_sec tm_min tm_hour
tm_mday tm_mon tm_year tm_wday tm_yday tm_isdst
That's 104 identifiers, which is less than a half of the total, but
not a _lot_ less than a half.
(3) The C standard actually reserves identifiers beginning with "_" for
use in the library.
(4) If your library uses one convention, and you do not have a decent
package system, closely imitating the library conventions is the
LAST thing you want to do because it increases the risk of accidental
name collision.
>but you like to in Ada because its standard library is full of them.
As explained above, this is *not* a good reason, and it is *not* the
reason why I use underscores in Ada identifiers. I use spelled out
words separated with underscores for the reasons given in the AQ&S
guidelines.
>I've never seen a student complain about formatting styles, but then
>I've only been teaching 11 years.
Well, I've been teaching 7 years, and the students complained every year.
They don't see why they should lay *their* code out to please *someone else*,
even if the someone else is the person who has to mark their ruddy code.
This year, marking about 40 2nd year students, I found that _none_ of them
followed the layout rules they were told they would be marked down for not
following, and only _one_ of them even came close.
>By the way, I've said before, the content in Feldman's book is
>first-rate and it's the best book I've seen, and the non-standard
>formatting doesn't have to be a big deal at all.
Of *COURSE* it is not a big deal to someone who already fully agrees with it!
YOU have students who
- don't mind following the style you give them
- do have trouble knowing which are the keywords
WE have students who
- DO mind very much following the style we give them
- do NOT have trouble knowing which are the keywords
They know because we TELL them, and give them lectures telling them
what they mean. If a student knows what "if then else end if" _means_
s/he doesn't need to be reminded that "if", "then", "else", "end" are
special words. Is it really _possible_ for a student to remember how
if-statements work without remembering that "if" is a special word?
And for die-hard "students who can remember if statements still need to
be reminded that if is a keyword" believers, why, putting "if" in lower
case when non-keywords don't begin with lower case letters is a perfectly
functional reminder.
--
Mixed Member Proportional---a *great* way to vote!
Richard A. O'Keefe; http://www.cs.rmit.edu.au/%7Eok; RMIT Comp.Sci.
prev parent reply other threads:[~1996-11-19 0:00 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-11-18 0:00 Looking for a good Ada 95 book Ray Toal
1996-11-18 0:00 ` Michael Feldman
1996-11-22 0:00 ` Robert Dewar
1996-11-23 0:00 ` Michael Feldman
1996-11-26 0:00 ` Jim Carr
1996-11-29 0:00 ` Dale Stanbrough
1996-11-30 0:00 ` Teaching Team/Maintenance Programming (was: Looking for a good book) Larry Kilgallen
1996-12-02 0:00 ` Looking for a good Ada 95 book Laurent Gasser
1996-12-02 0:00 ` John English
1996-12-13 0:00 ` Debora Weber-Wulff
1996-11-26 0:00 ` Suzanne B. Zampella
1996-11-27 0:00 ` Michael Feldman
1996-11-27 0:00 ` Larry Kilgallen
1996-11-29 0:00 ` Robert Dewar
1996-11-28 0:00 ` Robert Dewar
1996-11-23 0:00 ` Larry Kilgallen
1996-11-23 0:00 ` Robert Dewar
1996-11-23 0:00 ` jim hopper
1996-11-23 0:00 ` Robert Dewar
1996-11-24 0:00 ` jim hopper
1996-11-24 0:00 ` S. McLain
1996-11-25 0:00 ` Michael Feldman
1996-11-25 0:00 ` Robert Dewar
1996-11-27 0:00 ` Michael Feldman
1996-11-30 0:00 ` Frank Manning
1996-11-30 0:00 ` Robert Dewar
1996-12-02 0:00 ` Frank Manning
1996-11-30 0:00 ` Michael Feldman
1996-12-04 0:00 ` Dale Stanbrough
1996-12-04 0:00 ` Michael Feldman
1996-12-02 0:00 ` Richard A. O'Keefe
1996-12-02 0:00 ` Michael Feldman
1996-11-27 0:00 ` Richard A. O'Keefe
1996-11-27 0:00 ` Michael Feldman
1996-11-25 0:00 ` Darel Cullen
1996-11-26 0:00 ` S. McLain
1996-11-26 0:00 ` Darel Cullen
1996-11-19 0:00 ` Richard A. O'Keefe [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox