News for hackers. Stuff that matters.
Re:DotLisp – A Lisp dialect for .Net by kazagistar on Sunday March 22, 2015 @10:02PM (#9249111)
> I'm not a Lisp expert. Helpful suggestions are always welcome.

> ©2003 Rich Hickey, All Rights Reserved

I was amused.

Re:DotLisp – A Lisp dialect for .Net by Tomasoo on Monday March 23, 2015 @12:18AM (#9249480)
How things change.

Rich Hickey is a genius. A nice man. A practical man. A modest man. A role model for our industry.

Re:DotLisp – A Lisp dialect for .Net by Guthur on Monday March 23, 2015 @01:09AM (#9249578)
Genius is a little strong in my opinion. Still an intelligent and talent man I'm sure.

In my opinion he has made some questionable decisions with Clojure.

- Gratuitous use of [] in some forms; mainly defn and let. Why break the homonicity so often for no real benefit?

- Comment strings appearing before argument lists in functions. I would like to see the entire protocol, name and args, before reading the docstring which may refer to the args.

- List? predicate... (list? '(1)) => true (list? '(1 2)) => false ...

- Multi arity functon, the main justification in the documentation is due to JVM limitations, JVM limitations like these can be hidden by the hidden by the guest language http://clojure-doc.org/articles/language/functions.html#mult...

These are just my superficial opinions of Clojure, I am still very much at the beginning of my journey in learning the language.

Re:DotLisp – A Lisp dialect for .Net by escherize on Monday March 23, 2015 @06:43AM (#9250215)
Regarding:

    "- Comment strings appearing before argument lists in
    functions. I would like to see the entire protocol, 
    name and args, before reading the docstring which may 
    refer to the args."
I think writing one doc string for a multivariate function is better than having to write one for many. Check out clojure core's min function:

    (defn ^number min
      "Returns the least of the nums."
      ([x] x)
      ([x y] (cljs.core/min x y))
      ([x y & more]
       (reduce min (cljs.core/min x y) more)))

So there are occasions for this related to efficiency. Where would you prefer the docstring?
Re:DotLisp – A Lisp dialect for .Net by andrewchambers on Monday March 23, 2015 @03:15AM (#9249790)
"- Gratuitous use of [] in some forms; mainly defn and let. Why break the homonicity so often for no real benefit?"

[] is an array data type, () is a list. Code and data are still the same.

Re:DotLisp – A Lisp dialect for .Net by newuser88273 on Monday March 23, 2015 @09:00AM (#9250601)
Clojure code is surprisingly hard to edit for a Lisp-like language. The gratuitous use of square brackets where a Lisp would just use parentheses is part of that.

Omitting the parentheses inside those square brackets, however, was an even worse decision wrt editability. When you can't edit a sequence of syntactically homogenous items by simple s-expression manipulations, your Lisp's design is defective.

Re:DotLisp – A Lisp dialect for .Net by technomancy on Monday March 23, 2015 @03:14AM (#9249784)
> Why break the homonicity so often for no real benefit?

I don't think you understand what homoiconicity means.

Re:DotLisp – A Lisp dialect for .Net by Guthur on Monday March 23, 2015 @05:14AM (#9250018)
I see your point, I think you may downvoted because you did not elaborate rather than just say "you're wrong".

Let me see if I can elaborate on what I think you mean. Homoiconic can be interpreted as meaning that the programs structure is similar to it's internal representation and so then it can be argued that an argument list is implemented as a vector and so should be represented as such.

But I would suggestion that this is an implementation detail and would hazard that many Lisp implementation might share this implementation strategy. I suppose I should have described it as something along the lines of needlessly breaking with Lisp syntax traditions.

As an aside the reader macros themselves are not the problem as lists are not a one size fits all data structure within current computing so there is a need for vectors and hash maps etc.

Re:DotLisp – A Lisp dialect for .Net by moomin on Monday March 23, 2015 @04:38AM (#9249943)
YMMV, but it's interesting to note that some of these decisions are interrelated: [] and {} are implemented at the reader level and the reader isn't (very) extensible. This makes implementing defn (and by extension a user macro like it) much easier. The same is true of putting the sparring first.

The other thing with the docstring, of course, is that Rich made the decision to only have one docstring on an overloaded function. The docstring/arg order falls straight out of that. OTOH if you've read the docs for "map" recently you may be wondering if that was such a smart decision. For better or for worse, muti-arity overloading that doesn't just do partial application is a big part of modern Clojure.

Re:DotLisp – A Lisp dialect for .Net by philh on Monday March 23, 2015 @06:43AM (#9250218)
> List? predicate... (list? '(1)) => true (list? '(1 2)) => false

Uh? That doesn't seem to be the case on http://tryclj.com/ or according to http://clojuredocs.org/clojure.core/list_q .

Re:DotLisp – A Lisp dialect for .Net by cichli on Monday March 23, 2015 @07:28AM (#9250338)
syntax-quote can cause this:

  > (type `(1))
  clojure.lang.PersistentList
  > (type `(1 2))
  clojure.lang.Cons
  > (list? `(1 2))
  false
edit: however http://clojure.org/reader#syntax-quote does specify that syntax-quote is not the same as quote for some forms, including lists.