From: Arne Vajhøj on
On 06-06-2010 20:00, Harlan Messinger wrote:
> Peter Duniho wrote:
>> Harlan Messinger wrote:
>>> [...]
>>> Besides that, it isn't POSSIBLE to have what you're asking for
>>> because the number of possible distinct object values is infinite,
>>> and the range of available hash codes is finite. [...]
>>
>> While it may seem as though modern PCs are capable of infinitely large
>> data, it's not actually the case. :)
>
> The formality of "subject to the physical limitations of the hardware"
> is a little tedious sometimes. :-) *Conceptually*, of course, there is
> no limit.

The limit in .NET is more restricting than the limit of the hardware.

Arne
From: Harlan Messinger on
Arne Vajh�j wrote:
> On 06-06-2010 20:00, Harlan Messinger wrote:
>> Peter Duniho wrote:
>>> Harlan Messinger wrote:
>>>> [...]
>>>> Besides that, it isn't POSSIBLE to have what you're asking for
>>>> because the number of possible distinct object values is infinite,
>>>> and the range of available hash codes is finite. [...]
>>>
>>> While it may seem as though modern PCs are capable of infinitely large
>>> data, it's not actually the case. :)
>>
>> The formality of "subject to the physical limitations of the hardware"
>> is a little tedious sometimes. :-) *Conceptually*, of course, there is
>> no limit.
>
> The limit in .NET is more restricting than the limit of the hardware.

If you're going to be pendantic about it, then I will as well, and I
will note that you can define a type that has a field whose value is a
path to a file, and you can define the hash code for objects of that
type as a function of not only the contents of that file, but also the
contents of all other files, recursively, that are the identified by
paths appearing in files already processed in this formula, leading to a
result that is limited only by the hardware restrictions on the number
and size of files that can be stored on a computer. There is no reason
why you would do this, but that isn't the point.
From: Arne Vajhøj on
On 06-06-2010 22:32, Harlan Messinger wrote:
> Arne Vajh�j wrote:
>> On 06-06-2010 20:00, Harlan Messinger wrote:
>>> Peter Duniho wrote:
>>>> Harlan Messinger wrote:
>>>>> [...]
>>>>> Besides that, it isn't POSSIBLE to have what you're asking for
>>>>> because the number of possible distinct object values is infinite,
>>>>> and the range of available hash codes is finite. [...]
>>>>
>>>> While it may seem as though modern PCs are capable of infinitely large
>>>> data, it's not actually the case. :)
>>>
>>> The formality of "subject to the physical limitations of the hardware"
>>> is a little tedious sometimes. :-) *Conceptually*, of course, there is
>>> no limit.
>>
>> The limit in .NET is more restricting than the limit of the hardware.
>
> If you're going to be pendantic about it,

Given that the 2 GB limit is a practical limit on sub-1000$ PC's, then
it is hardly pedantic.

> then I will as well, and I
> will note that you can define a type that has a field whose value is a
> path to a file, and you can define the hash code for objects of that
> type as a function of not only the contents of that file, but also the
> contents of all other files, recursively, that are the identified by
> paths appearing in files already processed in this formula, leading to a
> result that is limited only by the hardware restrictions on the number
> and size of files that can be stored on a computer.

That does not give more distinct values.

Two objects with the same filename should get the same file data.

In fact the files are not different from any reference type. The
object only contains the pointer. But same pointer means same data.

Arne