[Date Index] [Thread Index] [Author Index]
Re: Re: How assume symbol integer?
> > 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