I disagree... strongly.

The value domain I am referring to is the one covered by your application, 
customized metadata is of little value elsewhere obviously.

In typed languages the container defines a lot about what can be done with a
value and what is forbidden.
Nobody would try to rely on the raw value to guess these things in a typed 
language.
The container is used for this purpose. Raw values are useless without their
container even more when it is composed to create complex types.

Data types are defined against your app. domain to carry values.

When you serialize in Java and send data on the wire, the data type is included,
and you need to have the same version available on both ends. Using RPCs,
you end up with the same requirement whether in C, Java, .... because data
has to be serialized against it's container definition which have to be agreed 
to
by both ends. No mismatches are tolerated.

The fact that many other languages do not support something
as dynamic as metadata does not mean that metadata is not an integral part of 
your domain values.

It merely says that these typed languages rely a lot on the data
containers to carry similar information that could be also carried by metadata
and have no or little need for dynamic metadata.

They however lack the flexibility that metadata offers. It can be generated 
dynamically, it can evolve without impacting other processing steps. 

Metadata has no impact on values, which allows values to be exchanged
even when the other party is unaware that additions have been made to the
metadata for other purposes.

Contrary to RPCs, native serialization, ... where a single slight change 
requires you 
to upgrade everyone to the new definition.

Saying that metadata should not be transmitted over the wire is restrictive and
unjustified when you compare with the alternatives.

I suspect that too few people have been using meta data customized to their app
and that many see it has an internal feature restricted to the Clojure runtime 
and
other exotic uses.

Luc P.


> On Aug 22, 2013 2:19 PM, "Softaddicts" <lprefonta...@softaddicts.ca> wrote:
> >
> >
> >
> >
> > > Jim,
> > > > This is indeed a hack and not a best practice, maybe you're not using
> the > right tool for your problem...
> > > > - If you want to exchange data (think values), you should not be in
> need of > keeping types and meta data
> >
> > Metadata is part of the Clojure environment and part of the value domain
> it handles.
> > Why should it not be transmitted along with the value ?
> > If the receiver is not written in Clojure it may be questionable an
> probably not
> > very useful to transmit it but otherwise ?
> 
> I don't think anyone suggested the type of a record should not be part of
> its edn representation. Here we're talking about arbitrary metadata. While
> it is "part of the Clojure environment," the way in which it's "part of the
> value domain it handles" is... subtle.
> 
> "An important thing to understand about metadata is that it is not
> considered to be part of the value of an object. As such, metadata does not
> impact equality (or hash codes). Two objects that differ only in metadata
> are equal."
> http://clojure.org/metadata
> 
> -- 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
--
Softaddicts<lprefonta...@softaddicts.ca> sent by ibisMail from my ipad!

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to