I've noticed that logging has moved into clojure.jar ... could Clojure
start leveraging logging to identify what namespace its compiling and
why; I'd love to see something like:

[Compiler] Compiling namepace cascade
[Compiler] Namespace cascade imports namespace cascade.asset
[Compiler] Compiling namespace cascade.asset
[Compiler] Compiled function cascade.asset/is-allowed-path
[Compiler] Finished compiling namespace cascade.asset
[Compiler] Finished compiling namespace cascade

etc.

One thing I've done in Tapestry is similar to this .. a thing I call
the OperationTracker which tracks what Tapestry is doing using a stack
of descriptive strings (stored in a ThreadLocal). When a deeply nested
exception occurs, Tapestry can describe why it got to that point, i.e.

[ 1] Realizing service Foo
[ 2] Instantiating core service implementation silly.example.FooImpl
[ 3] Finding injection for parameter #2 of silly.example.FooImpl(Bar, Baz)
[ 4] Realizing service Baz
....

This can be an alternative to logging, since its only needed when
something goes wrong.

This is really handy since so much code goes through the same exact
methods, just with different parameters, which is in common with
Clojure.  I've spent many years working on exception reporting in
Tapestry ... I'd love to see some of the same love for Clojure!

On Thu, Jun 17, 2010 at 11:50 PM, Laurent PETIT <laurent.pe...@gmail.com> wrote:
> Hi,
>
> 2010/6/18 Wilson MacGyver <wmacgy...@gmail.com>:
>> ^ was deprecated in 1.1 as per release note below
>> The ^ reader macro has been deprecated as a shortcut for meta in the
>> hopes that it can eventually replace the #^ reader macro.
>
> No, it's not that gray: in 1.2 (so in clojure master, and all new
> branches like prim, equal, etc.), ^ now has the same semantics as #^.
> #^ is still working as usual, but becomes deprecated. The behaviour of
> the old ^, as mentioned by Howard, requires the explicit (meta ) call.
>
> Howard, another point to have in mind in 1.2: some libraries from
> clojure contrib have partially migrated to clojure. For example I/O
> stuff has appeared in clojure.java.io. String manipulation stuff also.
> As a result, you may encounter warnings in your own code, or in
> libraries you use which may not yet have migrated to 1.2 (which is to
> be expected, since 1.2 is not out), or not be prepared for 1.2 (by
> avoiding 'use-ing foreign namespaces, but rather using aliases). The
> warnings will tell you when a var is re-def-ined (this is a new
> feature, which may or may no stay in core : before this warning
> feature, you just wouldn't have been able to compile the code,
> redefinitions of vars bound to external namespaces vars was an error.
> The new "warning only" behaviour tries to enhance the user experience:
> allow the code to run, until everybody has removed the warnings in new
> versions of their code).
>

My experience over the last several years is that warnings are always
ignored. Better to fail hard, fast and early ... as long as you inform
the dev what broke and how to fix it!

> HTH,
>
> --
> Laurent
>
> --
> 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



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

-- 
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

Reply via email to