MathGroup Archive 1997

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

Search the Archive

Re: Re: How assume symbol integer?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg8973] Re: [mg8916] Re: [mg8853] How assume symbol integer?
  • From: David Withoff <withoff>
  • Date: Mon, 6 Oct 1997 01:59:42 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

> > I want to make an assignment T = k/omega and somehow cause Mathematica
> > to know that k is an integer.  How do I do this?
> 
> If you find out, let me know.  In my opinion, the two single largest
> weaknesses of mathematica as a programming language is 1) no type
> declarations  and 2) Compile doesn't work on lists.

Compile does work on lists in Version 3.0.  Regarding your other point

> 1) no type declarations

this is a weakness only if there is something useful that can be
achieved using type declarations and that cannot be achieved more
effectively in some other way.

The Compile function already includes type declarations, where they
do provide for important advantages, but at the price of requiring you
to keep track of which expressions are vectors, which expressions
are integers, and so forth.

Similar type declarations could in principle be added to the rest of
Mathematica, but the price would be the same -- you would be obligated
to keep track of type information that can in most cases be handled
more effectively by the computer.  

If there is a weakness in the system, then I hope that the designers
of Mathematica will study that weakness directly, and figure out the
best way to address it.  If the solution turns out to be to add type
declarations, that is fine with me.  I'm not intrinsically opposed
to type declarations.  I'm just not convinced that they are the best
solution to the underlying problem (whatever that might be).

Dave Withoff
Wolfram Research


  • Prev by Date: TraceInternal and OptionQ
  • Next by Date: Re: Message[] color
  • Previous by thread: Re: How assume symbol integer?
  • Next by thread: Re: Undefined macro in LaTex file from Mma 3.0