Hacker News new | ask | show | jobs
by reitzensteinm 2162 days ago
For what it's worth, I agree with you. Clojure only weakly holds on to its lisp heritage. I'd liken it to the similarity between C# and C++ (without implying any superiority to either side). Superficially quite similar, some parts near identical, others a complete detour.

With that in mind, however, basing your critique of Clojure on the extent to which it carries the lisp tradition is bizarre. Your criticisms are born of an ignorance of the value proposition Clojure provides, which would not be terribly different even if it had eschewed lisp syntax in favor of something else.

If you actually learned Clojure, there is zero chance you'd be complaining about symbol interning. It's just so ridiculous. You'd probably still think the whole thing is a waste of time, and I'm sure you'd have a big long list of actual, meaningful complaints.

I've seen people criticize TXR for its ugly syntax once or twice here on HN (I pay close attention to lisp posts here), and I thought that was dumb at the time. I'm not interested in learning it but I'm glad you're trying something new. It's a shame to see you stoop to the same level of drive by dismissal.

But whatever. Let's flip each other's bozo bits and move on.

2 comments

Speaking of TXR, and of "holding on weakly", as a result of this discussion, I made a little change.

A remark was made somewhere that interned symbols are held with a non-weak reference. But it occurred to me that this isn't something engraved in stone. A package should be able to hold on to its interned symbols via weak references. This means that if the only reference to a symbol is from within a weak package, that symbol can be removed from the package and relclaimed by the garbage collector.

Since a package uses hash tables, and hash tables support weak keys, it's trivial to put the two together. I added an argument to make-package to specify a weak package.

In the following test, the symbols interned into package foo get reclaimed because it is weak. Those interned into bar don't get reclaimed:

  (defun weak-package-test (name weak)
    (let ((wp (make-package name weak)))
      (let ((*package* wp))
        (let ((obj (read "(a b c d e f)")))
          (mapcar (op finalize @1 prinl) obj)))))

  (weak-package-test "foo" t)
  (sys:gc t)

  (weak-package-test "bar" nil)
  (sys:gc t)

  $ ./txr weak-package.tl 
  foo:a
  foo:b
  foo:c
  foo:d
  foo:e
  foo:f
I'm committing to this as a documented feature.
I mentioned AutoLISP to make it clear that the comment is completely unrelated to value proposition, but in hindsight, that may be too obscure.
You call Clojure a cargo cult descendant, which implies it's failing to achieve what its ancestors did, by copying features haphazardly without understanding the deeper motivations behind them.

Clojure is a shitty substitute for CL, but that's just not what it is trying to be. It is an interesting and worthy system in its own right.

No it doesn't imply that; you can easily succeed while copying features haphazardly and without understanding the deeper motivations behind them.