From: "Andy "Krazy" Glew" on
nmm1(a)cam.ac.uk wrote:
> C99 allows you to encrypt addresses and/or save them on disk.
> Seriously.

Which is, seriously, a good idea. For certain classes of applications.
Such as when you want to persist a data structure to disk, that you will
later load into exactly the same machine, at the same locations. Like
in a phone switch.

However, for 99% of the jobs we need to do, not such a good idea.

Except... you can do stupid persistence packages for single threaded
machines, on OSes that guarantee that data is always allocated at the
same address. Ditto simplistic checkpoint recovery schemes.

So I guess that it is not all that stupid for those apps.

But it sure does get in the way for alias analysis.
From: Mike on

"Andy "Krazy" Glew" <ag-news(a)patten-glew.net> wrote in message
news:4B3E4928.7060703(a)patten-glew.net...
| nmm1(a)cam.ac.uk wrote:
| > C99 allows you to encrypt addresses and/or save them on disk.
| > Seriously.
|
| Which is, seriously, a good idea. For certain classes of
applications.
| Such as when you want to persist a data structure to disk, that you
will
| later load into exactly the same machine, at the same locations.
Like
| in a phone switch.
|
| However, for 99% of the jobs we need to do, not such a good idea.
|
| Except... you can do stupid persistence packages for single threaded
| machines, on OSes that guarantee that data is always allocated at
the
| same address. Ditto simplistic checkpoint recovery schemes.
|
| So I guess that it is not all that stupid for those apps.
|
| But it sure does get in the way for alias analysis.


The IBM System i (not single threaded) places the file system in a
single virtual address space in which all objects have a single
constant virtual location which is never reassigned. That may provide
a lead to a practical approach.


From: Bernd Paysan on
Mayan Moudgill wrote:

> Bernd Paysan wrote:
>> Mayan Moudgill wrote:
>>
>>>So: summarizing - I still don't think active messages is the right
>>>name. I haven't encountered any real-life instances where people
>>>actually send code to be executed (or even interpreted) at a
>>>low-level inside the device driver.
>>
>>
>> I have. Several different, to tell you. One guy (Heinz Schnitter)
>> sends source code around - this is a distributed programming system.
>> Another one (Chuck Moore) sends instructions around - this is a small
>> chip full of tiny CPUs. They all did not really generalize, though I
>> know that Chuck Moore knows what Heinz did.
>>
>>
>
> Got any references that are publically available?

Heinz Schnitter and ONF:

http://www.sciencedirect.com/science?_ob=ArticleURL&_udi=B6TJM-473M8WJ-
T&_user=10&_rdoc=1&_fmt=&_orig=search&_sort=d&_docanchor=&view=c&_searchStrId=1151440871&_rerunOrigin=google&_acct=C000050221&_version=1&_urlVersion=0&_userid=10&md5=dc48f8492091a87963b9d9bebf71ff88

(unfortunately, you have to pay for that... Elsevier hates open access)

Chucks SeaForth:

http://www.intellasys.net/index.php?option=com_content&task=view&id=35&Itemid=63

This is a commercial product, but Intellasys has basically folded down
since patent Trolls and engineers can't work together in the long run
;-).

--
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://www.jwdt.com/~paysan/
From: Bernd Paysan on
nmm1(a)cam.ac.uk wrote:

>>So, I agree that it might be nice to have a language "mode" that
>>forbids or deprecates the address-of operator. E.g. one that had a
>>special repreesentation for parameters, that allowed reference,
>>copy-in/out, etc. semantics. E.g. one that had a special
>>representation for the pointers that so many people use to walk down
>>an array or linked list.
>
> You couldn't add one to C, without making it unusable.

Hm, the most essential usage of address-of (unitary prefix &) in C is to
return multiple parameters. This one is dead easy: Allow returning
multiple parameters, e.g. as tuples (recently proposed for C#). A tuple
is an expression in the form

(a, b, c)

and you can write a call with multiple return values as follows:

(a, b, c) = multi_return_values(d, e, f, g);

and inside multi_return_values, you just write

(int, float, char *) multi_return_values(int d, char* e, float f, int g)
{
...
return (a, b, c);
}

Note that the signature of a function is now not <fname> '(' <parameter
list> ')', but it is <fname> <tuple>.

Using pointers to walk through arrays is not essential.

--
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://www.jwdt.com/~paysan/
From: nmm1 on
In article <pm0217-j09.ln1(a)vimes.paysan.nom>,
Bernd Paysan <bernd.paysan(a)gmx.de> wrote:
>
>>>So, I agree that it might be nice to have a language "mode" that
>>>forbids or deprecates the address-of operator. E.g. one that had a
>>>special repreesentation for parameters, that allowed reference,
>>>copy-in/out, etc. semantics. E.g. one that had a special
>>>representation for the pointers that so many people use to walk down
>>>an array or linked list.
>>
>> You couldn't add one to C, without making it unusable.
>
>Hm, the most essential usage of address-of (unitary prefix &) in C is to
>return multiple parameters. ...

The mind boggles. That is so far down the list of its uses that I
hadn't even thought of it.

You could start with trying to work out how to use scanf without it,
and then try to pass a subsection of an array to a function (which
then treats the subsection as a complete array).


Regards,
Nick Maclaren.