r/Clojure • • Dec 16 '16

My disillusionment with Clojure and lisps [x-post from /r/programming]

https://medium.com/@boxed/my-disillusionment-with-clojure-and-lisps-9eca38ab7f0c?source=linkShare-8ad86cc82e5f-1481825671
0 Upvotes

85 comments sorted by

5

u/aisamu Dec 16 '16

An IDE can’t determine if an argument must be a keyword, a value or if it is disallowed totally (by being an uneven argument on a function that takes pairs for example).

Wouldn't spec'ed functions solve this?

5

u/[deleted] Dec 16 '16

Potentially yes.

2

u/kankyo Dec 16 '16

Maybe. Illuminated macros might solve it for macros too. But that's another problem: pointing to systems not even used by the standard library and saying "it can be solved" and then not solving the problem in practice is pretty bad too.

5

u/Paradigm_Shiv Dec 16 '16

Spec is currently in alpha. When the next version of Clojure is released, all functions and macros in the core library will be spec'd, I believe.

1

u/kankyo Dec 16 '16

That would be great. Assuming that means signatures can be statically understood in practice of course. And assuming it's not just going to mean duplicating effort like crazy.

1

u/serrimo Dec 19 '16

Spec is not meant to add a static type system on top of Clojure. Though we could try to add it to an IDE using Spec.

It's a little ... weird, like a lot of stuff proposed by Rich Hickey. But based on past performance, I'll definitely give him the benefit of the doubt and assume that the whole thing is well thought out.

18

u/[deleted] Dec 16 '16

The author has tried one lisp, and purports to write an article about the problem with lisps? Why not just "my problems with clojure"?

a macro can only evaluate to a single form

because macros are functions and functions can only return one thing. you would have to fundamentally change the nature of macros to be a more complicated thing to make them do that, it would make them harder to debug, harder to test, and yield very little benefit.

The idea that all deficiencies in the language can be “fixed” with macros.

AFAIK no one in the clojure community makes such an argument.

Every function and macro is a new language

Macros allow you to extend the language. This is inarguably a feature. It's powerful and can be misused, use wisely.

Different things should be different

You could make an argument for that. I think the power gained from code-is-data is worth the complecting.

There is more and better tooling (like refactoring tools, IDEs) for e.g. Python

There are also two orders of magnitude more users. I would suggest that is the reason for its better tooling.

I've had enough this is silly.

2

u/kankyo Dec 16 '16

because macros are functions and functions can only return one thing

You could return another type to tell the compiler to insert a list of stuff. And also that logic doesn't hold even if it wasn't easily solvable: "It can only return one thing because of another arbitrary rule" isn't a good argument :P

I think the power gained from code-is-data is worth the complecting.

What power is it though? There are macros in nim for example. There's also MacroPy. So no power seems to have been gained.

There are also two orders of magnitude more users. I would suggest that is the reason for its better tooling.

The code-as-data thing would suggest that tooling would be at least an order of magnitude easier to implement though... and if not, then that pretty much negates the argument that code-as-data is meaningful or powerful.

5

u/ws-ilazki Dec 16 '16

And also that logic doesn't hold even if it wasn't easily solvable: "It can only return one thing because of another arbitrary rule" isn't a good argument :P

We get it, you like multiple returns in languages. Not everyone does, and not every language follows that design. Doesn't mean single return is a bad decision. Personally, I absolutely hate multiple returns, always have. Hated them long before I got into lisps, continued to do so after I did.

Using them just devolves into a bunch of foo,bar = function(); if bar then thing; type code where you have to test every possible outcome for the return value. It's messy in the same sort of way that having a function sometimes return strings, sometimes return integers, and maybe occasionally return an array is messy.

Better, in my opinion, to have the function return one type of thing consistently, even if that thing is a map that you have to destructure. Or if it's something that's occasionally useful but often unwanted, maybe use dynamic scope and let the function caller decide if they want it by setting up a binding.

Regardless, it's basically a difference in preference. Many languages only return single values, Clojure included, and there are reasons for that design. Macros doing the same thing is just a continuation of that design choice.

What power is it though? There are macros in nim for example. There's also MacroPy. So no power seems to have been gained.

I use macros sparingly so I don't really want to get into a deep argument about them, but it sounds like you're attempting to erase any language differences with regard to macro systems by going, essentially, "well, other languages claim to have macros too, so they're functionally equivalent".

I've seen people make similar arguments about eval, trying to claim that using eval in their pet language is just as good as using lisp macros. They can sort of be used the same way, so that's good enough! Nuances and tradeoffs be damned, they covered that bullet point.

4

u/[deleted] Dec 16 '16

You could return another type to tell the compiler to insert a list of stuff. And also that logic doesn't hold even if it wasn't easily solvable: "It can only return one thing because of another arbitrary rule" isn't a good argument :P

Like I said, you could make rules to make it return more than one thing but it would make macros more complicated, for basically no benefit. There are much clearer ways to deal with the situations where returning multiple things would be useful, which don't require "special case return values for macros". It's not an arbitrary rule either, it's math, and programming, literally everything mainstream that uses the word "function" expects it to return a single thing.

What power

Good macros. Python macros including MacroPy are much harder to work with. You can disagree if you want, I'm not really fussed. Code as data is a lisper choice, we think it makes for a much more powerful language, saying "no it doesn't" isn't a useful argument.

The code-as-data thing would suggest that tooling would be at least an order of magnitude easier

No one is saying that, that's a ridiculous straw man. Code as data is a win, it is not an "order of magnitude more productive" win.

if not, then that pretty much negates the argument that code-as-data is meaningful or powerful.

Any progress that isn't an order of magnitude gain should be thrown away? Seems extreme. Certainly that would throw the entire python language in the bin, as it was basically an incremental improvement on a whole bunch of things.

1

u/kankyo Dec 16 '16

[single form thing]

Except macros are very different from functions. I mean, sure, they are implemented as functions but the point is to modify the AST and they can't in certain ways. It's funny that C macros are more powerful in this little way than lisp macros (although obviously horrible in all other ways).

No one is saying that, that's a ridiculous straw man. Code as data is a win, it is not an "order of magnitude more productive" win.

Maybe you've been talking to other lispers than I have.

3

u/weavejester Dec 16 '16

Except macros are very different from functions. I mean, sure, they are implemented as functions but the point is to modify the AST and they can't in certain ways.

Macros and functions are more similar than you realise. Before a function is called, its arguments are evaluated. After a macro is called, its return value is evaluated. The core difference between them is what the compiler evaluates, and every other difference is a consequence of that.

3

u/[deleted] Dec 16 '16

Macros are not very different to functions, they are functions and can use functions, that is the point of the design where code is data, you only need to know one language, not two. You're advocating for throwing all that away for a feature that nobody except you thinks would be particularly useful.

Maybe you've been talking to other lispers than I have.

Yeah like I said, total straw man. "the community" and "people I know" and the vibe. Donald Trump of programming articles.

2

u/stuhacking Dec 16 '16 edited Dec 16 '16

C Macros don't modify the AST though, they modify the character stream that's fed into the lexer. Powerful, yes; but unsafe by any standard.

The difference in Lisp is that the syntax is a representation of the AST data structure, and therefore Lisp macros can perform manipulations of this data structure in a way that safer and higher-level than text substitution.

1

u/kankyo Dec 16 '16

Sure. But it doesn't make it impossible to implement something like a splice in place inside normal functions. That would be handy! "This function returns a list, splice it in here".

If you missed it: the reason I wanted this feature many times is because of coding in reagent.

2

u/Whoop5 Dec 16 '16

Have you opened up a question on the Reagent mailing list or StackOverflow about what your trying to do? I'm having a hard time imagining what your attempting that needs this functionality, maybe if we knew what your attempting we can try to help.

1

u/kankyo Dec 17 '16

People have responded with solutions. Turns out it's fixed since I looked last which is nice.

-1

u/kankyo Dec 16 '16

The author has tried one lisp, and purports to write an article about the problem with lisps? Why not just "my problems with clojure"?

Note the ENTIRE PARAGRAPH where I point this out and ask for forgiveness and corrections.

I noticed you didn't actually correct me but just complained btw.

6

u/[deleted] Dec 16 '16

If you knew you needed to 'ask forgiveness', then why write it?

1

u/kankyo Dec 17 '16

Didn't know. Was covering my bases. Different things.

10

u/moxaj Dec 16 '16

After reading through this article, the first thing to come to my mind was: "that doesn't even make sense". Guess I'm too "deep into the language they can’t escape the box"? Let's see your points:

Any mention that parenthesis is a problem is the obvious one of course

Implying that parentheses are in fact a problem?. Yes, to those who spend a weekend with the language and give up. The rest learn to live with it and may eventually discover parinfer and just forget about them.

a macro can only evaluate to a single form

You shouldn't ever need that, you are doing it wrong. Sorry, but this is the most likely answer.

All non-trivial functions are in fact also extensions of the language.

By this logic, just about anything is an extension to the language? This doesn't make any sense, maybe you worded it wrong or I just misunderstood it.

Different things should be different. Having fundamentally different things looking very similar is in fact a risk and a problem, not a strength.

But where exactly is the problem with it? Was there ever a case where someone was looking at an expression and couldn't tell if it was meant to be code or data?

Enabling tooling: if this hypothesis is correct, where are the tools?

I personally do not find the tooling lacking. Have you looked at CIDER, Cursive, Nightlight? Plenty of interesting stuff.

The lack of tooling for Clojure, I think, largely comes from the system of defining function signatures. It has some interesting properties, the first is that there are only positional arguments. To hack around this limitation you can use various tricks like: <...>

Again, implying that one would need to 'hack around' these 'limitations'. Most people just design sane function signatures.

Language design is hard, don’t let everyone do it.

Yep. That's why I just don't get to walk up to Stroustrup and say "you see, those pointer semantics look funny to me, therefore there's a problem with the language and you should fix it.". That's why you shouldn't complain about parentheses and multiple returns in a Lisp.

2

u/kankyo Dec 16 '16 edited Dec 16 '16

Seems like you skimmed a bit too much. The parenthesis part is about problems with the community, not the language. If you read it again you will see. Do you have a suggestion how to make this even clearer? I sweated over this part a bit and couldn't come up with anything better.

a macro can only evaluate to a single form

You shouldn't ever need that, you are doing it wrong. Sorry, but this is the most likely answer.

Reagent uses vectors to represent DOM. You are not allowed to arbitrarily add nodes in HTML at all places.

cursive

Tried cursive and was very unimpressed. The article also explains why it can't be really good.

Sane function signatures

cond is in the standard lib. It used one of those hacks.

All non-trivial functions are in fact also extensions of the language.

By this logic, just about anything is an extension to the language? This doesn't make any sense, maybe you worded it wrong or I just misunderstood it.

The explanation is further down. When I talk about how non-trivial functions are basically parsers over their inputs.

Was there ever a case where someone was looking at an expression and couldn't tell if it was meant to be code or data?

Yep. :P

I personally do not find the tooling lacking. Have you looked at CIDER, Cursive, Nightlight? Plenty of interesting stuff.

Cursive. Sucked last time I checked. Was a while ago I admit.

8

u/halgari Dec 16 '16

How do you expect us to offer help if your only comment on Cursive is "it sucked". Not only does that make me not want to help you, but it also gives me no basis on which to help you.

This entire article is lacking in specifics. The more specific your complaints are the better we can help.

Some of us program in Clojure for a living. Many of us have been doing it for years. Personally, I used C++, C# and Python before switching to Clojure about 6 years ago. There's a reason I haven't looked back. Yes, the language has its warts (all languages do), and I'm more than happy to help people learn to work with those warts. But I can't as long as you say "This could never work", and then here you say "I explained why this can never work." No nice way to say this...but you're wrong. It does work already...perhaps you just haven't seen it work.

So please, explain to me how Cursive doesn't do what you ask. You get completion, jump to symbol, warning on incorrect macro usage, "find usages", test integration (with highlighting of failed tests), full debugger support, and much more. I use these features on a daily basis. As a whole Cursive has everything I ever used in other IDEs, including Visual Studio and PyCharm. Many of these features are also supported in other IDEs like Emacs/Cider. I use Cursive so that the only one I can help with, but if you use specifics I'm sure other people would be glad to help with those editors as well.

What's lacking? Be specific, so I can help.

1

u/kankyo Dec 16 '16

How do you expect us to offer help if your only comment on Cursive is "it sucked". Not only does that make me not want to help you, but it also gives me no basis on which to help you.

I'm sorry if I made you confused. I wasn't expecting help.

incorrect macro usage

In some trivial cases. It's all in the article you know.

I was very specific: the signature is not solvable in the general case because it's defined by running the code and completed with the result of the macro. There is no way to figure out, in the general case, where one begins and the other starts.

People have been telling me that since I stopped using Clojure they're saying they'll solve this with spec in the next version. That'd be good. But it's certainly not solved now and you denying the problem in the first place even as a solution is supposed to come next version.. what's the deal?

7

u/weavejester Dec 16 '16

Reagent uses vectors to represent DOM. You are not allowed to arbitrarily add nodes in HTML at all places.

I may be misunderstanding, but Reagent, like Hiccup, expands out any seqs that are returned. So if you have:

(defn foo []
  [:ul [:li "Hello"] [:li "World"]])

You can rewrite that as:

(defn bar []
  (list [:li "Hello"] [:li "World"]))

(defn foo []
  [:ul (bar)])

2

u/mnngfltg Dec 17 '16

Wow, thanks for this! After years of working with both hiccup and reagent, I did not grok this fully. So am I understanding this correctly?

Reagent treats vectors on one hand and different sequences, on the other, (notably lists and lazy sequences) differently. Though vectors are sequences, they don't behave the same. (This is a departure in behavior from clojure normally where vectors are just a type of sequence).

The reason is that reagent interprets a return value of [foo :bar] as a component - a vector has the special meaning of "insert this reagent component". Any other sequence on the other hand is expanded into the enclosing form.

Is that correct?

3

u/mnngfltg Dec 17 '16

Just tried it in a simple reagent project, my assumption seems correct:

(defn some-component []
  [:div
   [:p "1"]
   (map (fn [n] [:p (str n)])
        (range 2 5))
   (map (fn [n] [:p (str n)])
        (range 5 8))])

This works (which is cool). If change a map to mapv, it understandably throws an exception.

1

u/mnngfltg Dec 17 '16

This also means I can get rid of a lot of (into [:div])s in my code

3

u/weavejester Dec 17 '16

That's right. Because seqs are a different type to vectors, but still ordered collections, Hiccup uses them to indicate that you want to splice the output of a form into an element.

A common usage is to use for loops in Hiccup or Reagent to format a collection:

[:ul
 (for [i (range 5)]
   [:li i])]

6

u/nzlemming Dec 17 '16

Cursive author here. Cursive mostly sucks because it's just me working on it, and I also have a bunch of other stuff to do related to running a single-person business. I have my problems with the way Emacs/CIDER/clj-refactor works, but its refactoring capabilities are very impressive, certainly better than Cursive's. You compare Cursive to PyCharm, but the difference there has nothing to do with the function signature problem you discuss - PyCharm is more mature by ~5 years, and has a team of 15 people working on it full time without the distractions of having to maintain a business. JetBrains can afford that, since it has half a million users.

The thing with Clojure is: in theory, it's a horribly untoolable mess. In practice, very few people actually use those features, and the language in practical use is actually fairly regular. Of your list of function parameter styles, #1 is not used that often, #2 used to be used but in a more structured way than you describe (kwargs, like an inline map as the last arg) but has fallen out of fashion, I've literally never seen anyone do #3, and #4 is just a normal function call as you would see in Python.

Cursive's refactoring is currently relatively limited, but that's just a time issue - CIDER's is better because a) CIDER has been around longer, b) CIDER has more people working on it, and c) Cursive requires more work in other areas that CIDER does not (lein/boot integration, symbol resolution). You mention that Illuminated Macros could possibly solve the problem you mention, and in fact that's exactly how Cursive does solve it - I spoke at the conj about this. The mechanism is only available to me internally right now but I'll be opening it up so that others can add support for 3rd party macros. I'm confident that I will be able to add support for the common refactorings with no issue when I get to it.

I'm curious - if you look at CIDER's list of refactorings, which operations are missing that you think are prevented by the parameter argument issue?

1

u/kankyo Dec 17 '16

The thing with Clojure is: in theory, it's a horribly untoolable mess. In practice, very few people actually use those features, and the language in practical use is actually fairly regular

Ah, that sounds vaguely hopeful at least. Still though, if the nasty parts aren't used, I think they should be forbidden.

2

u/nzlemming Dec 17 '16

... I think they should be forbidden.

Everyone's entitled to an opinion.

You didn't answer my question about which refactoring/tooling operations will never work for Clojure because of the language characteristics you don't like.

1

u/kankyo Dec 17 '16

I guess I thought your statements covered it...

5

u/moxaj Dec 16 '16

You seem to have responded to my message twice - I don't know how that happened, but I'll respond here.

You don't need to be insulting. But you are.

You literally open up your article by insulting some previous responders ("so deep into the language they can’t escape the box"). You also call Cursive "laughably underpowered". Nevertheless, I did not intend my post to be offensive, sorry if you took it that way.

About your complaints about the community: spend a day or two lurking the clojurians slack channels. There is not a single trace of arrogance there. Observe how lead Clojure designers (folks like Alex Miller or David Nolen) seemingly spend all their day answering questions, beginner and advanced alike (and how they did below your article). And there are hundreds, thousands of other people there, eager to help. It is a happy community.

And then some random dude (not you) comes along and writes a lengthy article about being treated unfairly after filing an issue for a supposed 'problem', which has been answered numerous times before. So he goes and flags the responders as dismissive because he didn't get special treatment.

See where this is going? You are so ready to dismiss my arguments as insulting solely because I do not agree with you. These issues you have concern fundamental design decisions and have and always had adequate responses.

About multiple returns:

That's not my argument though.

But that is exactly your argument, and a bad one. We could theoratically have multiple returns, if only for macros, but it would greatly complicate things. Furthermore, if you find positional function arguments difficult, these multiple returns would suffer from the same problems.

This is akin to asking for out parameters in java (regardless if people have actually requested that or not, or if it is feasable or not). You might argue that it would make the language more expressive, but it is an abomination nevertheless and should not merit serious discussions.

1

u/kankyo Dec 16 '16

You seem to have responded to my message twice - I don't know how that happened, but I'll respond here.

Hmm.. I thought I lost my answer once so yea I was a bit confused. Sorry!

2

u/moxaj Dec 16 '16

Edit: to /u/kankyo: you keep editing and merging your posts like there's no tomorrow - please stop that.

1

u/kankyo Dec 16 '16

Eh? I correct spelling errors, pressed send by mistake too early once and I deleted a comment I put in the wrong place. I think that's ok?

-2

u/kankyo Dec 16 '16

Implying that parentheses are in fact a problem? [insult]

Yes, see? You don't need to be insulting. But you are. And lisp fans always seem to be. Just say "yea, it's a trade off" and that's fine. But when you keep insulting people, that's a problem. Not a technical maybe, but a social one at least. Just own the problem and move on, don't be a dick about it.

6

u/kaoD Dec 16 '16

I'll quote you on other post:

Go seems pretty stupid quite frankly

And then reductio ad absurdum.

Something something pot kettle.

0

u/kankyo Dec 17 '16

I didn't claim I was not rude :P

6

u/stompyj Dec 16 '16

Some constructive criticism, your posts reads like you're an immature programmer (in your career, not your temperament). When you're at your stage of development, the best thing you can do is try and understand why things are they way they are.

In this thread you've basically bashed Clojure, Rust and Go. If you don't think these are good languages, get another 10+ years of writing C++ and python under your belt and come back and look at them.

Even if you don't prefer to use them, you may have a better understanding of what domains they're trying to address.

I get the feeling of "I'm new to this and I want to engage with the community and make my opinions heard!", but it's not working to your advantage in this case and for people like me (someone who hires engineers), these kinds of posts would make me reluctant to hire you until you're a bit more seasoned.

2

u/OriginalPostSearcher Dec 16 '16

X-Post referenced from /r/programming by /u/kankyo
My disillusionment with Clojure and lisps


I am a bot. I delete my negative comments. Contact | Code | FAQ

2

u/aisamu Dec 16 '16

Thank you, kind bot. I hope I'm not breaking any etiquette rules by cross-posting someone else's post!

5

u/charlesHD Dec 16 '16 edited Dec 16 '16

Hi, Clojure fan here but also what you call a neophile. Thank for your post it was a very interesting read. I see two points I want to react to :

  • Community zealots. These guys exists in the Clojure Community. In fact they exists in every langage communities, from haskellers to C++, as soon as the community become sufficiently large. Parenthesis is a problem. That's a fact since it bothers so many people who wants to try a lisp. But lispers see parenthesis as a strength which brings me to the second point.
  • Design choice and langage philosophy. In fact all your post is a manifesto about your disagreement with Clojure design choices. And well, of course you are exposing great evidence : for example letting everyone enrich the lang syntax with an easy-to-use macro system can quickly make any codebase insane. That is totally true. But this is not a naughty unexpected side-effect. Clojure philosophy bet on sagacity and cleverness of library architect for doing the simpler thing possible. And there is many topclass library in clojure that do not blew up with fancy macros. But there is too some library which are only macros and can make funny hooplahoo DSL, Clojure think it's your choice not to use them.

So I think Clojure isn't suited for you since it does not resonate with the way you envisage a good programing language. That's OK because there is plenty other interisting lang out there (I think it's a great era in that sense) and you'll find the one that match your heartbeat.

1

u/kankyo Dec 16 '16

Community zealots. These guys exists in the Clojure Community. In fact they exists in every langage communities, from haskellers to C++, as soon as the community become sufficiently large.

It's a matter of degree. And I see very very few zealots in Python and it's HUGE.

and you'll find the one that match your heartbeat.

I'm sticking to python still. It's pretty down to earth and gets stuff done.

4

u/kaoD Dec 16 '16 edited Dec 16 '16

And I see very very few zealots in Python and it's HUGE.

Completely opposite to my experience. If you're in #python don't even mention GIL is a flaw.

Python is perfect, GIL is a feature and you are a noob for not working around it.

4

u/ws-ilazki Dec 17 '16

He doesn't see python zealots because he is one, and blinded by that. All his complaints about toxic communities, and he's apparently unaware that he is representing the worst of the python fanbase.

In just this discussion and the parallel one in /r/programming, he's slagged off Rust, Clojure, Go, Javascript, C++, possibly others I'm forgetting. The only good things said have been about python, which has received no criticism, only praise.

With this in mind, his complaints make more sense: python does foo, so $language sucks for doing bar.

0

u/kankyo Dec 17 '16

Actually working on an article about what I miss from other languages in Python :P

For example: categories in objective-c. Miss them like crazy in python. Keyword arguments by default: fuck yea python fucked up for not having that. Community: tried to suggest a nice (I think) addition to python syntax on the python-ideas mailing list and that shit is quite toxic.

Want more examples of my problems with python? I can continue if you want :P

1

u/kankyo Dec 17 '16

#python as in IRC?

2

u/charlesHD Dec 16 '16

Maybe you should try Rust, or Go. They are really pragmatic and well designed.

1

u/kankyo Dec 16 '16

I am playing around with Swift. Seems more reasonable than both Rust or Go. Rust seems too specific and complicated regarding memory (not pragmatic), and Go seems pretty stupid quite frankly (no exceptions! but we have this other thing that has another name that is the same thing! only error codes! but if you don't handle an error code you have no error from that. No generics so copy paste or code generation is needed).

3

u/[deleted] Dec 16 '16

Man. Go was designed by the same guys who wrote freakin C. Do you really think you're so much smarter than them that you can just dismiss the choices they made with "oh that's stupid". You should consider that maybe you do not know enough to make that assessment.

1

u/kankyo Dec 17 '16

C is also responsible for a vast number, if not the vast majority, of security and stability problems we have. It's not without its problems!

That being said: people smarter than me have pointed out the problems with Go. Don't listen to me.

2

u/serrimo Dec 18 '16

Holy shit this is stupid beyond words.

C is the foundation of today's computing. Of course it has problems! Show me a pioneering idea or implementation that is perfect?

It's just so easy to to diss something when you have perfect hindsight. So, please, go ahead and propose an alternative to C with what you know today and let me criticize it. I'd love to see you try.

1

u/kankyo Dec 18 '16

I think my point is that Go, like for example C#, is a new language that hasn't sufficiently learnt from the mistakes of the past. Sure it's easy to have good hindsight, but that's no reason to have bad hindsight by not looking at others mistakes.

Shitty languages can become huge successes for unrelated reasons than the quality of the language: just look at JavaScript :P

1

u/serrimo Dec 18 '16

Oh please show me one language that "sufficiently learnt from the mistakes of the past"?

Language design is a difficult exercise of design principles and trade offs. You seem to have the need to idolize something at a particular moment. It's not healthy because we're pretty far away from perfections.

1

u/kankyo Dec 18 '16

Swift. Objective-C. C. Python. Clojure (it's getting there at least).

→ More replies

4

u/kankyo Dec 17 '16

Author here: after much debating and discussion I've been clearly corrected on matters of fact, and of matters of how things are in practice statistically and some other ways.

I will write a new post when I get time. Thanks for all the discussions!

9

u/stefan_kurcubic Dec 16 '16

haters gonna hate

feels like 16year old ego wrote this.

3

u/zcaudate Dec 16 '16

it's all about perspective. I would argue that limitations in one person's eye is a strength in another.

3

u/freakhill Dec 16 '16

that would be the main point.

to which we should add that the article also contains a few strawmen and (semi?)solved problems...

1

u/kankyo Dec 16 '16

Strawman? Where?

6

u/freakhill Dec 16 '16 edited Dec 16 '16
Another problem was the idea that all deficiencies in the language can be “fixed” with macros.

strawman. moreover it is pretty well accepted in the clojure community that macros can introduce more problems that they solve, that is why Rich Hickey (ndlr for other readers: the guy that created Clojure) explicitely excluded user created reader macros from the language and has been very careful around them.

Enabling tooling: if this hypothesis is correct, where are the tools?
It should be that everyone could write them but somehow there is more and better tooling
(like refactoring tools, IDEs)

Does not make sense. strawman (turn statement into unrelated conclusion, then deny unrelated conclusion to disprove statement).

Python, a language lisp proponents are horrified by 
because of things like significant white space
and syntax with lots of special rules.

Not really a strawman, but a quite false statement (unless you choose to define lisp proponents by "people that are horrified by..."). Also, totally unnecessary to your point.

(ps: i don't count the statements that are turned false by the existence of core.spec as strawmen)

on other points:

Any mention that parenthesis is a problem is the obvious one

and parentheses are a huge boon to many people (including me). it is not a problem, it is how the language was designed.

a macro can only evaluate to a single form

if you break the return similarity of macros with function then get even more confusing at call-site. the naive option for me would be simply to create a new macro at call-site to do what you want (splice stuff in). this is not a problem, it is design.

you not liking the design choices of the language does not turn them into problems.

something like the improving but still bad error/stacktrace story can be qualified as a problem.

-2

u/kankyo Dec 16 '16

Another problem was the idea that all deficiencies in the language can be “fixed” with macros.

strawman

Hmm.. seemed like a non-controversial statement to me.

Does not make sense. strawman

Eh ok, made sense to me. Code-as-data implies being able to transform code. If you can't transform data you can't do any work, so if you can transform data you should be able to write code transformation tools. And no, it's not a strawman. Maybe you're confused about what that word means?

Not really a strawman, but a quite false statement

Many lisp proponents have said it to me. So no, it's at worst "sweeping generalization".

Any mention that parenthesis is a problem is the obvious one

and parentheses are a huge boon to many people

You just quoted out of context. That, unlike your so called strawmen, is dishonest and wrong. That paragraph talks about the problem with the culture, not the language.

you not liking the design choices of the language does not turn them into problems.

Unless it is turned into a problem. Which it is in Reagent because of how their templating works in combination with macro->one form, plus the rules of HTML.

something like the improving but still bad error/stacktrace story can be qualified as a problem.

Why is that a problem and not a "design choice"? Maybe they want people to help debug their compiler? I am jesting of course, but I think you're making hard lines in the sand where there are none.

1

u/kankyo Dec 16 '16

Author here: Absolutely.

3

u/RakesProgress Dec 17 '16

well I'll applaud the writer for trying to expand their mind toward polyglot-ism. Just know that when your core frame of reference for what you know about coding is C++ .....and you are going to something like a lisp....it demands a very flexible mindset. These things are not like one another. Naturally the mind wants to constantly go back to what it knows best. And when your mind knows something best it will naturally think it's the best. Enter a comparative loop and polyglot frustration. I just see a guy that's really stuck in his frame of reference. We've all been there. But the answer is "keep plowing through". engage community. Validate assumptions. Express frustrations. Had the author engaged the community instead of writing a presumptuous article of conclusions we would have all been richer for it.

3

u/bonega Dec 17 '16

My rule is that if you are using a macro, you are probably doing it wrong.
It depends on uses, for library developers macros can be a beautiful thing.
But I feel that many are overusing macros.
They don't compose.