The semicolon character opens a single-line comment in Clojure (as is
traditional in lisp languages).  It's like // in Java.


On Wed, Oct 7, 2009 at 11:08 PM, vishy <vishalsod...@gmail.com> wrote:

>
> thanks for the comprehensive answer,clarified everything :)
> But, why ;; at the end?
>
> On Oct 7, 11:17 am, Abhishek Reddy <arbs...@gmail.com> wrote:
> > On Wed, Oct 7, 2009 at 5:57 PM, Mark Reid <mark.r...@gmail.com> wrote:
> > > I'm not sure if this is the "best" approach but I found that if you
> >
> > >    (use 'clojure.contrib.math)
> >
> > > instead of require, it should work.
> >
> > In practice, an unqualified 'use' form can be bad style, because your
> code
> > will contain symbols whose origin is unknown to a human reader.  It also
> > unnecessarily risks collisions, if you refer different namespaces that
> might
> > define the same names.
> >
> > Better:
> >
> >     (use '[clojure.contrib.math :only [lcm]]) ;; so you know where 'lcm'
> > comes from, and nothing else can collide
> >
> >     (require '[clojure.contrib.math :as math]) ;; allows you to write
> > (math/lcm x y), and nothing will collide
> >
> > --
> > Abhishek Reddyhttp://abhishek.geek.nz
> >
>


-- 
Abhishek Reddy
http://abhishek.geek.nz

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