GC & GPC question.

Peter Gerwinski peter at gerwinski.de
Thu Mar 9 23:52:24 CET 2000


Khimenko Victor wrote:
> >> What about introducing a second `New' that allows the user to
> >> pass an additional parameter to the allocator?
> 
> > Might be a solution. (Not that the syntax of `New' isn't already
> > complicated enough... :-/)
> 
> Hmm. IMO something like p:=new[shm_alloc,pool1](string,100); should be
> recognizeable enough and should not disturb existing mess there much.
> Even if it's look more like LaTeX then C++ :-)

I do not like this syntax too much.  (For Pascal.  It's okay for
LaTeX.;-)  In principle, it should not be too hard to implement

    New (allocator_function, other_parameters)

but with the current implementation of `New' it would need some
nontrivial work in the parser.

A clean solution would be a re-write of the parser to accept
about any command-line for `New' and then do the analysis
afterwards.

The only real problem with this approach would be the implicit
`with' in `New' when a constructor of an object is called.

    Peter

-- 
http://home.pages.de/~Peter.Gerwinski/ - G-N-U GmbH: http://www.g-n-u.de
Maintainer GNU Pascal - http://home.pages.de/~GNU-Pascal/ - gpc-19990118
GnuPG key fingerprint: 9E7C 0FC4 8A62 5536 1730 A932 9834 65DB 2143 9422
keys: ftp://ftp.gerwinski.de/pub/keys/ - AntiSpam: http://spam.abuse.net




More information about the Gpc mailing list