Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Coding Standard - ns usage
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Denis Labaye  
View profile  
 More options Nov 10 2012, 11:50 pm
From: Denis Labaye <denis.lab...@gmail.com>
Date: Sun, 11 Nov 2012 05:49:43 +0100
Local: Sat, Nov 10 2012 11:49 pm
Subject: Re: Coding Standard - ns usage

Talking about `use` and `require`:

How are you dealing with the repetition of each namespace "configuration"?

Each time I create a new namespace I add the following boilerplate:

(ns foo.bar
  (:use      [clojure
             [pprint              :only [pprint pp]]
             [repl                :only [doc find-doc apropos]]]
            [clojure.java.javadoc :only [javadoc]]
            [clojure.tools.trace  :only [trace deftrace trace-forms
trace-ns untrace-ns trace-vars]])
  (:require [clojure
             [set                     :as set]
             [string                  :as str]
             [xml                     :as xml]]
            [clojure.java
             [shell                   :as sh]
             [io                      :as io]]))

How do you avoid repeating this ? A clojure macro?, IDE support?, ... ?

On Fri, Nov 9, 2012 at 7:07 PM, Softaddicts <lprefonta...@softaddicts.ca>wrote:

> Yep but still longer to type :) we are in the process of shrinking the
> code base,
> nit expanding it, any bytes count :))

> > On Fri, Nov 9, 2012 at 8:28 AM, Sean Corfield <seancorfi...@gmail.com>
> wrote:
> > > On Thu, Nov 8, 2012 at 3:19 PM, Softaddicts <
> lprefonta...@softaddicts.ca> wrote:
> > >> Removing use would force us to redefine it somehow.
> > > (:use clojure.tools.trace) => (:require [clojure.tools.trace :refer
> :all)

> > *sigh* no paredit in Gmail and I haven't had my coffee yet:

> > (ns ...
> >   (:use clojure.tools.trace) => (:require [clojure.tools.trace :refer
> :all])
> >   ...)

> > but I'm sure y'all knew what I meant.
> > --
> > Sean A Corfield -- (904) 302-SEAN
> > An Architect's View -- http://corfield.org/
> > World Singles, LLC. -- http://worldsingles.com/

> > "Perfection is the enemy of the good."
> > -- Gustave Flaubert, French realist novelist (1821-1880)

> > --
> > 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+unsubscribe@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/clojure?hl=en

> --
> 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+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.