Reviving this thread, as I'd like to kmow if someone can explain the purpose of
the type metadata and what is responsible for adding it?
--
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
Not
Looks like pre defrecord stuff used in early days to add "type" to map. Can
still be used if you need "type" on a map without using defrecord.
среда, 24 октября 2018 г., 10:30:14 UTC+3 пользователь Didier написал:
>
> Reviving this thread, as I'd like to kmow if someone can explain the
> purpose
the type function in clojure.core lets you override the nominal class of an
object with the :type metadata
user=> (type {})
clojure.lang.PersistentArrayMap
user=> (type ^{:type :foo} {})
:foo
On Wed, Oct 24, 2018 at 9:41 AM alex wrote:
> Looks like pre defrecord stuff used in early days to a
Found this:
https://groups.google.com/forum/#!searchin/clojure/%22type$20metadata%22%7Csort:date/clojure/LBGsPs2__pQ/oLgx_kgmQxgJ
:tag is applied to source forms to communicate type hints to the
compiler. :type can be used, by convention, to add 'type names' to
runtime data structures that supp
I don't understand what is going on here. I'm trying to throw an exception
with a cause and sometimes the cause is included in the stacktrace and
sometimes it isn't.
~$ clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.10.0-beta4"}}}'
Clojure 1.10.0-beta4
user=> (try (/ 1 0) (catch Except
I am not sure if this is the reason, but I would recommend checking the
command line options used when starting the java process in these cases.
Leiningen uses some command line options by default, for faster startup
times I think, that might affect how much detail is captured in stack
traces when
Thanks. I would not have thought to check that.
These are the processes running after launching each REPL.
$ clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.10.0-beta4"}}}'
Does not include cause.
rlwrap -r -q \" -b (){}[],^%3@";:' clojure -Sdeps {:deps
{org.clojure/clojure {:mvn/vers
Re clj / the built-in repl:
user=> (doc pst)
-
clojure.repl/pst
([] [e-or-depth] [e depth])
Prints a stack trace of the exception, to the depth requested. If none
supplied, *uses the root cause* of the
most recent repl exception (*e), and a depth of 12.
That is, it on
Thanks, Alex. I didn't know about *e or Throwable->map.
-austin
On Wednesday, October 24, 2018 at 9:07:44 PM UTC-7, Alex Miller wrote:
>
> Re clj / the built-in repl:
>
> user=> (doc pst)
> -
> clojure.repl/pst
> ([] [e-or-depth] [e depth])
> Prints a stack trace of the