On Sun, Nov 2, 2008 at 4:16 PM, Timothy Clemans
<[EMAIL PROTECTED]> wrote:
>
> Would it be possible to have a beginners mode where undefined
> variables are allowed?

Nobody has proposed a technically feasible way to actually do this yet,
so I don't know whether or not it is possible.    I suspect it is, but would
have to try several ideas to see if any work well.

> A user could easily change the mode to standard
> using say set_mode_standard() or something similar. Maybe have Sage
> state the mode both on the command line and in the notebook. The only
> problem would be that some people might share code that has undefined
> variables with people that are using the standard mode.

This reminds me of implicit_multiplication:

sage: implicit_multiplication(True)
sage: var('x')
x
sage: 3x^3 + 5x - 2
3*x^3 + 5*x - 2

That sets things in a funny convenience mode, and it hasn't turned out to
cause trouble, as far as I know.

So if/when there is a technical way to have automatic variable
definition, maybe having
a mode that does it probably won't cause much trouble for users, in practice.

 -- William

>
> On Sun, Nov 2, 2008 at 6:58 PM, Ronan Paixão <[EMAIL PROTECTED]> wrote:
>>
>>
>>> I personally Python well suited to mathematical computation,
>>> and at least the approach in Python regarding undefined variables
>>> is consistent with every other general purpose programming
>>> language I've ever used.  But it is definitely different than Mathematica.
>>
>> The problem lies in the fact that not everyone using a CAS is a
>> programmer (though obviously that would help a lot). In the same manner,
>> some people using other systems eventually learn how to handle it
>> (MATLAB's symbolic package requires declaring variables).
>>
>> A compromise solution would be the already proposed use of an init file
>> which includes a declaration of all single-letter variables (that would
>> help a lot, but also would create havoc for users who don't read the
>> manual and try to use multi-letter variables due to consistency, in the
>> same way it would avoid problems with function names typos). That's a
>> hard design decision in itself.
>>
>> Another solution would be to have an init file with that line commented
>> out, and a remark in the tutorial and the manual explaining its usage. I
>> believe that would be a good workaround, because whoever enables it
>> should know what he's doing and that would not create a consistency
>> dilemma (with the added effect of making the novice user know the great
>> help an init file can provide).
>>
>> Ronan Paixão
>>
>>
>> >
>>
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to