RE: TTY debugger and the portray mechanism.

From: josh singer <josh.singer_at_parc-technologies.com>
Date: Thu 15 May 2003 09:08:42 AM GMT
Message-ID: <3E899FAFBF56D611B6A500508B9A9DA234273F@LON-SRV2>
> > Maybe this is because the portray exported by test_module_b 
> is not visible
> > in test_module.
> 
> That's right. You have stepped into a different module context,
> where the portray is not visible. Operator declarations and the like
> will have similar behaviour.
> 
> 
> > But this is to be expected, since test_module is often a
> > low-level utility, which wouldn't be expected to know about the
> > peculiarities of some application-specific data module 
> (test_module_b).
> 
> If anyone has an idea how to do better, let me know!
> With plain data structures, we don't have any module information
> attached, i.e. we don't know in which module the data structure
> was originally created, so we don't know where we should look
> for a portray declaration.

Being an OO dilettante, I'd (inevitably) suggest that we allow exported
structs to be thought of as object instances, whose home module (i.e. class
definition) is the module they were exported from. Perhaps this would be a
variant of ":- export(struct... " e.g. ":- export(object...". Lots of other
OO things would follow from this. I guess we are informally already doing
this a lot by using the handle pattern. 

The obvious objection here is what if two modules export the same struct --
How would you tell them apart? You'd have to store the home module in the
struct somewhere. 

If we did anything here, we'd probably need to consider in general how we
could add OO options to ECLiPSe, rather than adding bits and bobs piecemeal.

josh

Josh Singer
Software Developer, Parc Technologies Limited
Tel. +44 (0)207 261 4067
josh.singer@parc-technologies.com
http://www.parc-technologies.com

This e-mail message is for the sole use of the intended recipient(s)
-its contents are the property of Parc Technologies Limited (or its
licensors) and are confidential. Please do not copy, review, use
(except for the intended purposes), disclose or distribute the e-mail
or its contents (or allow anyone else to do so) without our prior
permission. Parc Technologies Limited does not guarantee that this
e-mail has not been intercepted and amended nor that it is
virus-free. You should carry out your own virus checks before opening
any attachment.  Any opinions expressed in this e-mail message are
those of the author and not necessarily Parc Technologies Limited.
Received on Thu May 15 10:11:03 2003

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:21 PM GMT GMT