propoal: persistence though id

[email protected]
Newsgroups gmane.comp.lang.prothon.user
Message-ID <[email protected]>
i'm new to this list, but have read a few hundred posts, still, apologises if this is in any way a repeat,

i'm here because prothon seems to be being driven by some of the issues i have with python,


anyway here's a proposal, it's about persistence,

persistence, it seems to me, needs to be at the core of a language, i have looked at a mix-in class to confer persistence, but when i started thinking about it, i found the real problem is not how an object is represented, but how generally it can be identified.

an objects 'id', or identity, is just something that, when equal to another id, means you've got two references to the same object. Using memory addresses for id's, works well and by doing so, i think its telling us something more fundamental, maybe that an 'id' is actually showing how an object can be located.  So, in a way, rather than id being 'identity', which seems to me to imply an abstract reference, id could be 'identify', which implies something more dynamic.

so the idea is to be able to set an objects id to a resource reference, and in particular, to the most ubiquitous reference system out there, URL's. 

but in the simplest case the 'id' could just be a local file name, and cause an object to be automatically persisted to that file.  

examples:

1.  small objects with a file name id, would just be dynamically persisted all the time, like database records, with object locking being used to drive file locking. ( then do you actually need a memory representation?  isn't this what might happen on a system where the memory was static, and the distinction between memory and files was only a matter of format. )

2.  larger saving/loading of settings/data etc. could be a collection of object references, made with a file name id, then by locking, updating any references and unlocking, all the objects could be stored/retrieved in a single access. ( won't this be just like a settings file, or a registry, if the file were stored in a user dependent area.)

Also a URL could specify the format, using the protocol, eg

FILE: bespoke format
HTTP: human readable format  ( XML with styles? )


Note: doesn't this have similarities to Java's use of a domain name in class/file locating.


and now for something blue sky,

what starts out as storage, ie pull technology, can be expanded to push/pull.  Remote setting and retrieval of data via a URL is already well established.  push/pull can be used for communication, communication with a user is a GUI, so a connection to a document object model, could allow a very nice, browser based, user interface that could take advantage other browser resources. ( 2D, 3D, speech etc.)



















__________________________________________________________________
Switch to the New Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need. 

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.