MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Subscripts, Doh!!!

  • To: mathgroup at smc.vnet.net
  • Subject: [mg19321] Re: Subscripts, Doh!!!
  • From: Jason Harris <j.harris at phys.canterbury.ac.nz>
  • Date: Sat, 14 Aug 1999 23:42:51 -0400
  • References: <7o5ier$rme@smc.vnet.net> <7oba5o$3p6@smc.vnet.net> <"199908060358.XAA08108"@smc.vnet.net> <v04210100b3d0c0366e0b@[172.16.41.9]> <"199908120524.BAA04506"@smc.vnet.net> <"199908130234.WAA07302"@smc.vnet.net> <v04210100b3db06a519b8@[172.16.41.9]> <37B57797.F2E524F6@fermi.phys.washington.edu>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

Carl Woll Wrote:
>I suppose I should have mentioned why I don't like to use the Symbolize
>function. Primarily, it's because I hate to use palettes, and the 
>latest update
>of the Notation package required you to use palettes in order to permform a
>symbolization. Apparently this has been fixed in version 4.

Yep. Mathematica now has input aliases so I could add this feature to 
4.0. After loading the package you can enter Esc-symb-Esc to get a 
Symbolize template.


>Jason wrote:
>
>> Moreover, setting attributes on a system level function as major as
>> Subscript is begging for trouble. Some packages will break because
>> you assume Subscript has the attribute HoldFirst. ( E.g. consider the
>> construction of a matrix of coordinates
>> Table[Subscript[coord[i],j],{i,1,3},{j,1,3}]].)
>
>This example seems rather contrived to me.

Sure. I came up with it off the top of my head. However, I do know 
that in practice, many weird and strange occurrences happen in 
packages and other peoples code. Usually much stranger than examples 
I think up off the top of my head. So you can be fairly confident 
that it will break somebodies code. I just wanted to give a 
semi-plausible reason why this would occur.


> Yes, Subscript is a major system
>level function. However, it does not have any built in definitions, 
>so it seems
>to me that any definitions which will be attached to Subscript will be user
>defined. I agree with Colin Rose, a HoldFirst attribute for Subscript is a
>better default choice. Then, if you really want to do something unusual, like
>your table, you can just stick in an Evaluate in the appropriate place.

You, being a Mathematica veteran, must be aware that this kind of 
thing is in general a no-no :) Especially since Subscript is a data 
structure type head, that is more akin to Plus, Times, Power, etc; as 
opposed to a function type head like Expand, Simplify, etc...

Most importantly though this solution still doesn't get around the 
other problems outlined in the previous email.

As always though your mileage may vary :)

Cheers,

   Jason


  • Prev by Date: Re: Re: Re: Subscripts, Doh!!!
  • Next by Date: Re: Re: Re: Subscripts, Doh!!!
  • Previous by thread: Re: Re: Re: Subscripts, Doh!!!
  • Next by thread: Re: Re: Re: Subscripts, Doh!!!