News for hackers. Stuff that matters.
Re:“A closure is a poor man’s object; an object is a poor ma... by ratmice on Monday May 01, 2017 @11:17AM (#14238175)
I don't really agree as well,

Modula-3 (although i'm not terribly familiar with the language) has partial revelation (a rather nuanced form of encapsulation), and branding where structural transparency does not preclude nominal identity... I tend to view the whole thing as a false dichotomy.

Re:“A closure is a poor man’s object; an object is a poor ma... by naasking on Monday May 01, 2017 @11:23AM (#14238234)
I'm not sure what you're disagreeing with specifically. "Partial revelation" sounds like a feature of ADTs they mixed into objects, which all modern OO languages have done, so I'm not sure what you think is the relevance to objects specifically.
Re:“A closure is a poor man’s object; an object is a poor ma... by ratmice on Monday May 01, 2017 @11:46AM (#14238499)
I was kind of disagreeing with 2 things:

that encapsulation must be all encompassing, and that identity is not meaningful or useful for transparent immutable data...

Re:“A closure is a poor man’s object; an object is a poor ma... by naasking on Monday May 01, 2017 @11:59AM (#14238656)
> that encapsulation must be all encompassing

If we're trying to characterize "objects" in its purest sense, it must have some all-encompassing property. Mixing in other properties for pragmatic reasons doesn't seem relevant here.

> that identity is not meaningful or useful for transparent immutable data

No one claimed it wasn't useful, simply that it's not necessary to have objects.

Re:“A closure is a poor man’s object; an object is a poor ma... by ratmice on Monday May 01, 2017 @12:11PM (#14238778)
>No one claimed it wasn't useful, simply that it's not necessary to have objects.

"Immutable data structures necessarily don't have identity (well, to say identity isn't meaningful because aliases can simply be seen as copies)."

I read saying that it is necessariy for them not to have identity, and that giving them identity isn't useful or meaningful.

If it said "don't necessarily" instead of necessarily don't, I would agree

Re:“A closure is a poor man’s object; an object is a poor ma... by seanmcdirmid on Monday May 01, 2017 @12:37PM (#14239051)
My point here was whether they had identities or not wasn't meaningful, since they are (well, should be) purely judged by their value.

I didn't make any value judgements about the usefulness of immutable data structures.

Re:“A closure is a poor man’s object; an object is a poor ma... by ratmice on Monday May 01, 2017 @01:32PM (#14239577)
Exactly what I thought you were saying, and disagree with.

I consider it fine to say "Objects require identity", without identity a fully encapsulated object is nothing more than an anonymous black hole.

When you turn this around to "Only objects require identity", or "identity is not meaningful for data", a hash code is one example of data which could benefit from identity, since you do not want to mix hash codes made by different hash functions. The positive integers 0,1,2... differentiated between the set of nonnegative integers are another simple

to preclude identity from data, is to preclude the ability to differentiate these on anything but the value level. surely a simplification, but by no means necessary.

Re:“A closure is a poor man’s object; an object is a poor ma... by seanmcdirmid on Monday May 01, 2017 @09:27PM (#14243292)
Hash functions on values don't depend on identity and collisions are accepted as part of hash's definition. A GUID (and MD 5 hashes) for all practical purposes are identities.

Identities really mess up equational reasoning which is why they are basically missing from pure functional languages like Haskell. A lot of clever solutions like FRP involve solving what are otherwise straightforward problems without resorting to the use of identity.

Re:“A closure is a poor man’s object; an object is a poor ma... by ratmice on Tuesday May 02, 2017 @01:01AM (#14244067)
Identities do not mess anything up, the commonly employed implementations of identity however do...

again check out modula-3 and more recently the paper at http://drops.dagstuhl.de/opus/volltexte/2015/5231/

Apologies I meant the identity of the hash algorithm e.g. MD5, attached to the bits produced by running the hash algorithm on an object, while hash collisions are absolutely accepted, mixing hash values produced by different hash functions is generally frowned upon.

Identity at the structural level is very much either you care about the identity, or you do not (in which case "this one"...), maybe 99.9% of the time "this one" suffices, however the takeaway from this should be that identity of structurally transparent objects should be ignorable, rather than structurally transparent objects should not have identity should one care to acknowledge it.