The namespace stuff sucks with Clojure πŸ’” Instead of (go 'north) I need to (go :atlas.earth.frobnicated.potassium-derived.map-directed/north)

@Sandra hey, could you please elaborate a bit. I'm interested in this

@lxsameer there's also this blog post https://idiomdrottning.org/enums on my philosophy more generally to just use flat names simply without defining them specially.
Follow

@Sandra Thanks πŸ™ .

I read your post and the thread as well.

First of all let me clarify my intentions. I'm working on a Lisp dialect compiler and I'm interested to learn about peoples perspective on different Lisps out there. Also I'm looking for a constructive discussion and not the typical "you are wrong" discussion on social media.

1) I didn't get your issue with clojure keywords vs enums quite well.

2) do you think keywords are redundant and we can use symbols as a replacement?
1/2

Β· Β· Web Β· 2 Β· 0 Β· 0

@Sandra
3) What other issues you have with clojure or anyother Lisp?

4) Is there any thing about clojure that impressed you?

It would be awesome to share you experience πŸ˜‰

@lxsameer

I designed my own dream lisp called brev but then got hired to work on writing Clojure code.

I love Clojure and think it's one of the world's best and easiest languages but I'm obviously missing some features from brev. In Clojure's favor, it's much better at concurrency than brev is. Brev is a tangled, dangerous, messy, magic, implicit footgun of a language.

I think plain un-namespaced symbols can make a lot code more simple. Just using words directly (symbols) without explicitly encoding their semantics and schema.

I also don't like the [], {} stuff. Stick to normal letters and round parens: https://idiomdrottning.org/lisp-naming for example use (ht foo bar) over {:foo bar}

I don't like that keywords look like :this instead of like this: although I realize that it's to match Common Lisp. Brev inherits from Chicken (brev is implemented as a library for Chicken and can export its programs as Chicken modules) the ability to use either syntax equivalently.

I really miss brev's define which can destructure both in car and cdr positions.
For example:

(define ((open sesame) (arms legs))
(sesame legs))

((over (x y))
(map open (list - + - + -))
'((1 2) (3 4) (5 6) (7 8) (9 10)))

=> (-2 4 -6 8 -10)

There's lots and lots of other stuff I miss. The destructuring macro facility, the fn (Clojure has #(%1) but that can only handle one expression, there's no implicit do/progn/begin, and again the ascii art clutter issue), the as-list combinator that lets you use list operators on any data type etc.

Call-tables and side effects (although those make concurrency a lot more hairy).
@lxsameer It's awesome and fantastic in Clojure how dereferencing is first-class! (:foo {:foo "bar"}) is great β™₯
I use that all the time, I love it. In brev, instead call tables are callable
((ctq banana yellow) 'banana) => 'yellow
which works just as well since we have shorthanded combinators:
(fn (x 'yellow))

@Sandra
Is Brev open source ?

How do you feel about type systems ?

Also coming from Clojure, probably you're familiar with the simplicity vs complexity debate. How do you define complexity in terms of a programming language and specially a lisp

@Sandra
Also forgot to ask that, how do you feel about reader macros and extensibility of a Lisp in general ?
(judging by your preferences around ascii chars usage I might be able to guess the answer though πŸ˜‰ )

@lxsameer Yes, brev the meta-library is public domain, though it has some copyleft dependencies (like define-options which is LGPL). The brev-separate library is BSD 1-clause.

Simplicity and complexity is something that has many axes or parameters.
I prefer implicit over explicit, brief over long, convention over boiler-plate, DRY over redundant, batteries over minimalist. I like DWIMmy, shorthanded code.

As you guessed, I don't use a lot of reader macros myself but I enjoy seeing them backdoored into lexers, like that old CL library that could read literal XML directly.

I don't enjoy using type systems at all. Probably my least favorite invention in all of programming. I love multimethods and polymorphism but with brev I can dispatch them on any predicate or structure shape, not just previously defined types. I can have one method for short lists and one for long, for example. (I get that this is possible with Clojure multimethods too with the right dispatcher, although all targets need to destructure similarly which is a limitation brev doesn't have.)

@Sandra indeed. Fun to talk about and even more fun to work on

Sign in to participate in the conversation
lxsameer's backyard

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!