+1 to everything James said.
--
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
IMeta only allows you to read metadata.
IObj is for immutable data that can be duplicated with new metadata.
IReference is for references.
So an immutable map would implement IObj, but an atom would implement
IReference.
If you want to support metadata, you need to decide what type of object it
To start with, IObj and its .meta method are used with clojure.core/meta to
get the metadata on an object. Since this method can be the same between
refs and immutable data, they all use the same interface.
IMeta is used with withMeta and clojure.core/with-meta to return a new
object with the
>
> FWIW, bigdec? seemed to fit better, given bigdec as a coercion and
> BigDecimal as the underlying type – decimal? always seemed like the anomaly.
>
Thought so too, but since there's no small decimal, or any other decimal,
its survivable. Though it does get a bit confusing, especially since
Hey, I was surprised to find that IMeta does not work for (with-meta).
So it seems that withMeta is added to IObj, which extends IMeta. And it
seems like alterMeta and resetMeta are added in IReference, which also
extends IMeta.
So now if you want to support meta, you have to implement
I want to say the same. I've been using Clojure for nearly a decade and it
remains my favorite language to work in, largely thanks to the ecosystem
and wonderful community. Keep up the good work!
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To
Simplicity is a rare pleasure, and so too is a standard library diverging
only immaterially from the ideal of 1 data structure and 100 functions. In
Clojure, it saves a lot of time that would otherwise be spent asking
questions on Stack Overflow. Or rather, it frees up a lot of time for
Aside from needing to change bigdec? to decimal? in four places in our code,
testing with Beta 4 has not shown any problems so we’ll probably go to
production with it early next week.
FWIW, bigdec? seemed to fit better, given bigdec as a coercion and BigDecimal
as the underlying type –
when you use ^{}, that applies metadata to the next form. In the
highlighted code, you are trying to put metadata on the keyword :component
- perhaps the ^TestType metadata should go on the hash-map on that line
instead of turning the whole hash-map into metadata ?
On Wed, Nov 1, 2017 at 7:37 AM
Hello,
I have forgetten an error that 'lein compile' gives.
java.lang.IllegalArgumentException: Metadata can only be applied to
IMetas, compiling:(rhsm/cockpit/tests/register_tests.clj:88:35)
Exception in thread "main" java.lang.IllegalArgumentException: Metadata
can only be applied to
Hello everybody,
I am trying to annotate a method in clojure where annotation type is made
up of nested annotations.
Example of similar java code:
https://github.com/jstavel/rhsm-qe/blob/polarion-annotations/src/rhsm/cli/tests/ContentTests.java#L66
I want to do the same in clojure.
This is
This.
Sent from my iPhone
> On 31 Oct 2017, at 23:59, Alan Moore wrote:
>
> All,
>
> I want to give a shout out to all the Clojure, ClojureScript, library and
> tool developers (all y’all really) to say how much I appreciate your efforts.
>
> It takes a lot of
12 matches
Mail list logo