extra data in expressions
- To: mathgroup at smc.vnet.net
- Subject: [mg53367] extra data in expressions
- From: joshuahorowitz at comcast.net
- Date: Sat, 8 Jan 2005 02:39:36 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Here's a rather abstract foundations question: I once unthinkingly assumed that an expression was determined by its head and parts. This is of course very wrong: any two expressions with head Real, no matter how different, have head Real and no parts. Same goes for Symbol, Integer, String, and all other "atomic" expression heads. This means that certain expressions can (and must) hold hidden extra data. My question is whether there are any consistent, logical semantics for this extra data. Can an expression contain both parts AND extra data? Which built-in symbols (or rather, expressions with head one of these built-in symbols) contain extra data; is there a list somewhere? Can user-defined symbols contain user-defined extra data? Why does Head[String @@ 1] return Integer? What else could it possibly return? I'm starting to suspect that "everything is an expression" involves some pretty ugly exceptions.
- Follow-Ups:
- Re: extra data in expressions
- From: Andrzej Kozlowski <akoz@mimuw.edu.pl>
- Re: extra data in expressions
- From: DrBob <drbob@bigfoot.com>
- Re: extra data in expressions