[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Cleaning issues

From: Ralf Hemmecke
Subject: Re: [Axiom-developer] Cleaning issues
Date: Sun, 27 May 2007 09:35:14 +0200
User-agent: Thunderbird (X11/20070326)

On 05/27/2007 04:34 AM, Gabriel Dos Reis wrote:
Waldek Hebisch <address@hidden> writes:

| I have looked at older issues in Issue Tracker and it seems that
| there are significant number of issues which are just users not
| understanding what Axiom is doing and expecting different result.
| | For example issue 165 the user clearly do not understand that
| that Axiom blindly performs specified computations and that
| | [j for j in 4.. | j < 10 ] | | simply is an infinite loop.

This one is indeed "paradoxical" at first sight, but is indeed
an infinite computation. What can we do about it? Fo course we can tell user that he/she does not understand.
Can we help with warnings from the interpreter or compiler?  Maybe we

If an (optional) warning can be issued that would certainly be helpful. But one might run into that problem als in a .spad file.

Waldek, I wouldn't close that issue. The Axiom book should clearly state that a user might fall into this trap and at least give an example that the user probably meant.

  [j for j in 4.. while j < 10]


  [j for j in 4..9]

| Simiarly 335 sort! drops list elements is just example of
| linked list.  Something like:
| | (1) -> bb := [3, 4, 1, 2] | | (1) [3,4,1,2]
|                                                    Type: List PositiveInteger
| (2) -> bs := sort! bb
| | (2) [1,2,3,4]
|                                                    Type: List PositiveInteger
| (3) -> bb

In Aldor one is told that if you use bang functions (i.e. functions that end in ! which are meant to be destructive on one of their arguments) you should be very very careful. In fact, you should never use the argument that you just destroyed. If a user still uses bb, it is *his* fault.

I know that that sounds a little too much for a beginner, but it is a simple rule. "Take care when you are using bang functions, you might introduce an explosion."


reply via email to

[Prev in Thread] Current Thread [Next in Thread]