Bill Allombert on Sat, 04 Feb 2006 16:52:38 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PATCH 2.2.11+] Support for :: in identifiers |
On Fri, Feb 03, 2006 at 03:53:55PM -0800, Ilya Zakharevich wrote: > On Fri, Feb 03, 2006 at 05:19:24PM +0100, Bill Allombert wrote: > > > Remarks: > > > > > > a) I have no idea what this ':'-magic in filtre0() is doing. > > > > The magic implement 2.2.8-C47: > > > > 47- ':' no longer allowed as a substitute for ';' if compatible = 0. Use > > GP2C semantics [ x:int, v:vec ]. For the time being the type > > information is discarded. > > AFAICS, this syntax should not be broken by the patch. On the other > hand, given that ":" may be useful, should not the type info be less > contradicting possible future syntax extensions (the first things > which comes to my mind is something like x.:int)? The current GP2C syntax allows to use : on any object as a cast: 1:int, 1.:gen, [1,2]:gen, log(x):real, x[2]:pol, (x\y):small etc. are all valid. Actually, this is what is implemented by 2.2.8-C47. The simpler use of ':' in declaration f(x:small)=local(s:int);... was implemented in 2.2.1-C28. Cheers, Bill.