On Mon, Aug 25, 2008 at 2:03 AM, Gabriel Dos Reis wrote:
> Alfredo Portes writes:
> | After what Gaby explained me, I am not trying anything in the
> | interpreter. Is like using 2 different languages :-)
>
> They are 2 different but close languages.  Some people think
> they should not, some believe interactive sessions should not
> be overly picky.  I won't tell you where I stands :-)
>

Well, I do think they should be more similar but I am not sure I trust
the type inference done by the interpreter enough to say that the
compiler should do the same. At least the interpreter should be more
"transparent". It should be possible to know exactly the coercions and
transformations that it performs. The current commands such as

  )set message bottom-up on

are just too obscure and inadequate. What I would like to put on the
"wish list" is feature that allows the interpreter to display exactly
the coercions and conversions that it performings. E.g.

  )set message disambiguate on

Then a command like:

  (1)  -> 1 - 1

   (coerce$Integer@(PositiveInteger->Integer))(1$PositiveInteger)  -
(coerce$Integer@(PositiveInteger->Integer))(1$PositiveInteger)
  % > 0 => convert(%)@PositiveInteger
  % >= 0 => convert(%)@ NonNegativeInteger

     0
                                Type: NonNegativeInteger

Unfortunately in some cases the interpreter performs transformations
in low-level Boot and/or Lisp code that has no direct equivalent in
the library such as the 'convert' operations above. Probably these
should be replaced with library extensions.

This example is fairly simple but already the result seems rather
complicated to do by hand. In more complicated cases it is sometimes
very difficult to predict exactly what the interpreter is doing.
Converting interpreter code to compiler code in this case can be very
frustrating and may even require looking as the interpreter source
code to know for sure... I think a disambiguate option would help a
lot in this case.

Regards,
Bill Page.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel

Reply via email to