Karim Belabas on Tue, 2 Dec 1997 22:01:34 +0100

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

Opinion poll.

Hi all,

  I plan to change some functionalities in the GP syntax, and I'd like to
know if anyone strongly objected to those, I.e if what I'm planing to do will
badly break something you rely upon.

Case 1: label / goto.

* those two functions are currently badly broken: they can only be used
reliably at a given nesting level. What should be their main use (getting out
of a deeply nested loop) simply does not work: you get a syntax error for
perfectly legal code:

(21:36) gp >  while(1, goto(1)); label(1)

  ***   expected character: ')'
  ***   instead of: while(1,goto(1));label(1)

* functions like break(), next() and return() are now provided that do exactly
that, in a clean and reliable way.

* even if you don't use them, these two functions slow (a little bit) the
analyzer. I could fix them completely, using (part of) the code from the
functions mentioned above, but that would involve (much) increased
inefficiency and code ugliness, for what I think would be negligible gain.

(* personal aestethic reason: the analyzer code would be MUCH neater/clearer
without them.)

So I'd like to completely remove them.

Case 2: '_'

  Currently, this is a synonym for conjugation (x_ := conj(x), so
that I_ = -I, quadgen(8) = -w, etc). It was not documented before 
version 2.0 (it now is along with all GP operators in section 2.5 of the

  I think it would be more useful to be able to use this symbol in
identifiers (function names, variable names). Compare the readability of
(I picked a random (admittedly rather silly) example from one of my scripts):

  PickaName (those two are allowed)

  pick_a_name (currently not allowed)

I think in any case its current behaviour is rather useless, so I'd like to
remove it from the operators and add it to the valid characters.

What do you think ?

Cheers, Karim.

P.S: Sorry if you are subscribed to both pari-users and pari-dev and receive
this mail twice. I wasn't sure the latter was an exact subset of the former.
Karim Belabas                          e-mail:
Max-Planck-Institut fuer Mathematik       karim@mpim-bonn.mpg.de
Gottfried-Claren-Str. 26               tel:
53225 Bonn (Germany)                      (00 49 228) 402-245