On capitalization
- To: mathgroup at smc.vnet.net
- Subject: [mg42112] On capitalization
- From: Selwyn Hollis <selwynh at earthlink.net>
- Date: Thu, 19 Jun 2003 03:59:46 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On Wednesday, June 18, 2003, at 02:11 AM, Will Self wrote:
> ...
> Notice I've changed your caps to smalls. You are courting trouble
> to use capital letters, or capitalized symbols, in Mathematica. In
> fact, look at this:
>
> DSolve[C'[t] == C[t], C[t], t] ----> {{C[t] -> E^t*C[1]}}
>
> which is just plain wrong. Maybe you can track down why. Hint, it
> has to do with using capital letters.
>
Wrong? If apply the rule, you get the same thing you'd get if you
didn't use C[t].
Maybe it's just my lifelong penchant for questioning authority and my
distaste for sweeping arbitrary rules when simple specific rules will
do, or maybe I just feel like starting a good argument, but it seems to
me that this whole never-use-caps thing is way overblown.
First, there are only a few single-letter symbols that are problematic:
C, D, E, I, K, N, and O, (Okay maybe that's more than a few...) and
once you've used Mathematica for a few hours, you'll rarely, if ever,
feel the urge to use those. Second, they are protected symbols anyway,
so you can't make assignments to them even if you try, unless you go to
the trouble to use Unprotect. The same goes for (essentially?) all
built-in symbols.
That's not to say that avoiding caps is not a *good idea* for the
beginner. I highly recommend it. My point is that it's *just* a good
idea and not worth being pedantic about.
That's just my opinion; I could be wrong.
-----
Selwyn Hollis
http://www.math.armstrong.edu/faculty/hollis