r/programming • u/[deleted] • Jun 11 '16
My Increasing Frustration With Clojure
http://ashtonkemerling.com/blog/2016/06/11/my-increasing-frustration-with-clojure/116
u/argv_minus_one Jun 11 '16
Rich Hickey said in 2009 “the fact that these functions happen to work when the second argument is not a set is an implementation artifact and not a promise of the interface”.
And that, children, is why dynamic typing is a fucking horrible idea.
46
u/stgabe Jun 11 '16
100 times this.
Arguments for dynamic typing, IME, always come down to someone confusing typing speed with programmer productivity. Don't get me wrong, it's certainly possible to misuse types and create headaches, but with modern typed languages and moderately reasonable programmers that's easy to avoid. The value you get from setting explicit contracts on code, generating tens of thousands of implicit/free unit tests on your code and improving readability is too huge to pass up just because someone's too lazy to type out a type signature.
23
Jun 12 '16
You don't even need to type out type signatures. One of the most joyful parts of using Standard ML and Haskell, is, in my experience, that type inference finds my errors for me, as long as my design is sufficiently typeful.
1
u/CaptainJaXon Jun 13 '16
We use Java for our main code base and Groovy to write our acceptance tests. We have a little franework set up for it. Every single field is a def. It's so annoying to code with because content assist has no idea what anything really is. The most annoying thing about it to me is that Groovy is a dynamic language that you can use types in but no one in our team does!
The comparison I like to make is "would you make everything and Object in Java with casting?" Then I look at our code base and in some places qe do because people have misused abstract classes/interfaces without type parameters.
Save me.
-4
u/Serializedrequests Jun 12 '16 edited Jun 12 '16
This is not absolutely true. You have to realize the reason for a lot of dynamic languages is it was hard to get any work done in Java or C++ of the kind that scripting languages are good at.
Now there are other modern typed languages, but the old guard is still going strong and finally getting much needed upgrades.
But Java's type system still feels like something you have to fight more often then not, a lot of popular design patterns are just for working around it, and all references being nullable means that there will always be a giant escape hatch from safety. Compared to Java (which I work in every day) I would still take Ruby or Python. Most of my job is just shuffling strings around so they look pretty to clients
Compared to newer typed languages, the benefits of scripting languages are a little less clear.
4
u/stgabe Jun 12 '16
I think scripting languages are fine for disposable code. If all you're doing is "shuffling strings" then maybe it's fine to use whichever language has your favorite RegEx engine and acknowledge that you're creating write-only code that you shouldn't expect anyone else to understand/maintain (including yourself in a month). As long as you're in an an environment where occasional bugs aren't a big deal anyway.
1
u/Serializedrequests Jun 13 '16
I would not call a 100k line Rails project I have been working on off and on for the last two years unmaintainable or disposable. It has a clear set of conventions that are repeated over and over, and a comprehensive and easy-to-update test suite that proves it works.
Now there are bad things about it to be sure. Not arguing that, but Ruby also makes it very easy to use good patterns. The ease of prototyping of this language can actually be a big win for maintainability.
Just saying it's not all black and white. I have been working a lot with Elm so I get the benefits of that kind of Haskell-y typing, but there is also a lot of wiring to do before I can add a single feature in it, and the learning curve compared to imperative languages is very high.
0
u/stgabe Jun 13 '16
It's not that you can't do it, just that you shouldn't. As for the "wiring" that is almost always because of a framework you're using and not because of types themselves. You can rapidly prototype quite easily in Java and C++ and still have types. I've written full games in days (even hours) with both and without any casting from void shenanigans. Typing speed != productivity.
3
Jun 12 '16 edited Jun 12 '16
ML is from the 70's, and I have no problems programming in it. I even have the luxury of using design constraints like:
No unreachable code paths, which means no exceptions.
Reusing anything that can be reused, no matter how tiny. Copy-paste is verboten.
Haskell, another programming language that gives similar benefits, is younger (1990) than C++ (1983), but older than Java (1995).
By comparison, Java is a dynamic programming language (unsound mutable covariant arrays, downcasts, class metaobjects, annotation processing) that happens to require verbose annotations to appease a glorified linter.
1
u/Serializedrequests Jun 13 '16
I am talking about languages you might actually get to use in a job. As I'm sure you know, even if you can choose Haskell for new projects, legacy Java and C++ is ubiquitous. I have never seen an ML job posting, so more power to you if you can create one.
7
Jun 12 '16
You're only considering statically typed languages with bad static type systems...
1
u/BufferUnderpants Jun 12 '16
Those are the ones you'll probably be given the choice to use, so it's reasonable to complain about them.
0
Jun 13 '16
Plenty of people work in languages other than Java and C++
I've never had to use C++ and I haven't been required to use Java since college...
0
u/BufferUnderpants Jun 13 '16
If you aren't using Java, C# or C++, chances are that you are using a dynamically typed language or you are doing something for which I hope you are charging a boatload of money.
You may find Scala jobs in some places, though, but for most programmers using an statically typed language means using one of those other three.
2
Jun 13 '16
I don't mind the C# type system, definitely nicer than Java...
Also, what about Swift?
1
u/frugalmail Jun 16 '16
I don't mind the C# type system, definitely nicer than Java...
outside of reification / var, they're pretty much the same thing, unless I'm missing something?
1
Jun 16 '16
Delegates, events, more sensible covariance/contravariance, structs, generics that can handle List<int>, etc...
→ More replies (0)0
Jun 12 '16
[deleted]
2
Jun 12 '16
Honestly I've found that only thing that dynamic typing helps with is prototyping and that only if it is not half-assed like in most languages
0
u/CaptainJaXon Jun 13 '16
At some point I heard someone say something like "Haskell programmers would tell you a missing key is a type exception." I don't get why Haskell specifically but I started thinking about it and realized that a class, apart from it's methods, is sort of like a map between strings and objects and suddenly it made sense what that meant (other than the Haskell part).
Now whenever we have a map with a specific set of expected strings I see if it makes sense as a class.
35
Jun 12 '16 edited Jun 13 '16
I'm very much a static typing fan, have little love for Lisp and its derivatives (although I'm impressed by Racket), but even I think you're being needlessly dismissive, and, sadly, also wrong. The problem here is abstraction enforcement, which can be done either statically (with types) or dynamically (with runtime checks).
There are three fundamentally different ways in which collections can be combined:
Concatenation, which acts on sequences, and is neither commutative nor idempotent.
Merging, which acts on priority queues and multisets, and is commutative but not idempotent.
Union, which acts on sets, and is both commutative and idempotent.
There are some sensible coercions:
Every set can be coerced into a multiset in which every element occurs exactly once.
Every priority queue can be coerced into a sequence by lazily removing the minimum element until the heap is empty.
Every sorted multiset can be coerced into a sequence by traversing its elements in order.
Compatible coercions, like set->multiset and multiset->sequence, may be composed.
But there's no sensible way to coerce a sequence into a set. The elements of a sequence might not even have decidable equality testing, which the set abstraction needs to ensure that no element is duplicated. The union of two things that are neither sets nor coercible to sets should be treated as an error, to be caught either at compile-time (which Clojure won't do, and that's fine) or at runtime (which any sensible dynamic language should do). Protecting abstractions is fundamental if you want to avoid bugs.
7
u/Tekmo Jun 12 '16
Haskell has a pretty sane approach here: require explicit coercions between different collections types. This prevents a lot of headaches
7
u/JW_00000 Jun 12 '16
Python has the same, sane approach, but enforced at runtime: (
|is the union operator,{}creates a set,[]creates a list)>>> {1,2,3} | {4,5,6} set([1, 2, 3, 4, 5, 6]) >>> {1,2,3} | [4,5,6] Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported operand type(s) for |: 'set' and 'list'The problem is implicit (and ill-defined) coercions (i.e. weak typing), not dynamic typing per se.
4
Jun 12 '16
Even some implicit coercions can make sense, as long as they are in some sense “canonical” or “natural”. For instance, an ordered set (e.g., a B-tree, but not a hashtable) can be coerced into a sequence in an obvious way.
3
Jun 12 '16 edited Jun 12 '16
Sure, and it works great! ;-)
In a more loosey-goosey (un)typed language like Clojure, some of those coercions can be made implicit, but it's very important to make sure no abstractions are being broken.
3
u/kcuf Jun 11 '16
That is the downside (and when things get big, or complicated, it is a very big downside), but it also provides upsides as well.
12
u/argv_minus_one Jun 11 '16
Such as?
7
u/everywhere_anyhow Jun 11 '16
The short answer is that it's so useful, if you don't have it you frequently find static languages putting in hacks to try to get it.
The medium answer is this:
The problem with types is that they force you to say things that you don't know are true, just to get the compiler to bless your program. "Here is the interface between these two objects" is a good example of the kind of thing you are forced to say before you know it's true. The interface between two objects invariably changes. I like not having to specify it when it is sure to change. Instead, I can say "This object needs an object like that in order to work". I know this is true (for now) because the code demands it. When the code changes and the interface changes, I change the code (which I know needs to change), but I don't have to change anything else. -- KentBeck
The long answer is here: http://c2.com/cgi/wiki?BenefitsOfDynamicTyping
17
11
u/ais523 Jun 12 '16
In a statically typed language, you're trying to prove to the compiler that what you're doing makes sense, or it'll warn you that what you're doing doesn't make sense.
In a dynamically typed language, you don't have to prove anything to the compiler, but if your code isn't correct, it won't work and you won't be given any warning until it breaks.
Most programmers would typically document their interfaces anyway, in which case having the documentation enforced by the compiler is only going to help catch mistakes. Dynamic typing only really helps if you don't know what the interfaces are, or if they're too complex to be easily expressed in the machine-readable syntax that your statically typed programming language of choice provides. I'm a static typing fan because I find that in practice, I'm much more likely to make a mistake than the language is to not understand the interfaces I need (although both have happened!)
Probably the best example is refactoring. Suppose you want to change the interface. In a good statically typed language, you change the definition of the interface in one place, and the compiler will tell you everywhere else that needs changing. But if the compiler doesn't know what the interface was in the first place, how can it possibly figure out what has changed? Instead, all the effort of finding out what needs doing is placed onto the programmer, which in practice requires that the program is small enough that you can remember or find all the potential problems by yourself.
2
Jun 12 '16
but if your code isn't correct, it won't work and you won't be given any warning until it breaks.
In a dynamic language, no analysis of the program text will report abstraction misuses, but that there exist other legitimate forms of abstraction enforcement, like runtime checks. While arguably static enforcement is superior whenever it can be used (because the error happens before you deploy your program to your users), dynamic enforcement also has its merits (like the availability of concrete data illustrating the error in your code).
2
u/ais523 Jun 12 '16
Right, that's what I was trying to get at with the "until it breaks".
I guess I have a bit of an unusual point of view because both my day job and hobby programming are heavily related to refactoring, in some cases on code that I didn't write originally. It is orders of magnitude faster to have the compiler tell me everything that needs changing, rather than having to run the program on a testsuite each time in order to hit all the cases that broke one by one (and even that requires that the tests hit all the cases that could be relevant).
It can be an amazing feeling spending a week or two weeks making a change and dealing with all its ramifications, and then discovering that the program works correctly the first time you actually get to run it.
2
Jun 12 '16
I guess I have a bit of an unusual point of view because both my day job and hobby programming are heavily related to refactoring
My day job is primarily writing new code, and only refactoring en passant when I need to fix a bug. But my hobby programming is all about refactoring. First I make a concrete version of something, get it to work, then split it into composable parts. ML-style type abstraction is invaluable for this sort of thing.
It can be an amazing feeling spending a week or two weeks making a change and dealing with all its ramifications, and then discovering that the program works correctly the first time you actually get to run it.
Agreed. That's exactly what I love so much about using Standard ML and Haskell too.
4
u/sammymammy2 Jun 12 '16 edited Dec 07 '17
THIS HAS BEEN REMOVED BY THE USER
2
u/ais523 Jun 12 '16
In Lisp, the boundary between compile time and runtime is pretty fluid! I can certainly see that sort of thing potentially helping, though, and it shows that the boundary between static and dynamic typing is also somewhat fluid.
My main reservation is that you have to specify the types manually, something which really shouldn't be necessary in programming languages nowadays for an example as simple as that one. (This is not only because actually specifying the type can be tedious sometimes, but also because having the type as general as possible helps in refactoring. For example, I commonly have functions that copy things around without inspecting them, and those functions really want to be polymorphic on the field in question. Specifying this is often a nightmare in a language without type inference.) That doesn't seem like an insurmountable issue in this case, although whatever's implementing that at the compiler side of things would probably have to be much more complex to propagate the types correctly.
6
45
u/badcommandorfilename Jun 11 '16
That just sounds like Cowboy coding logic to me.
You've realised that there is an exception to the rules that you've been working with so far. You could examine your logic or domain model and try understand how your design should change to accommodate this new situation. You could just write an adapter function, or modify the contract that the interface presents. Perhaps the round peg you're trying to force into a square hole isn't actually as similar as you originally thought.
Or, you could just jam it in there without thinking through the consequences.
Static typing isn't about 'pleasing the compiler', it's about making your code structured and internally consistent. Do you really need dynamic typing because your software is entirely composed of edge cases and exceptions to the rules, or did you just not take the time to understand the problem you were being paid to solve?
7
u/everywhere_anyhow Jun 12 '16
That's a pretty pejorative way of looking at that argument, to the point where I don't recognize the original in your slanted treatment. Cowboy coding is simple name calling, that page I linked has an extensive and detailed set of arguments pro and con, but I don't think you saw those.
14
Jun 12 '16
The problem with types is that they force you to say things that you don't know are true, just to get the compiler to bless your program.
This is so painfully pejorative that they might as well be preaching to the choir after this statement. Everyone else probably stopped reading.
2
u/uututhrwa Jun 12 '16 edited Jun 12 '16
Static typing isn't about 'pleasing the compiler', it's about making your code structured and internally consistent.
You can have structured and modular code even without static typing. The problem is the lack of typing at all, that is the code does implicit automatic type coercions and doesn't throw an exception early enough.
Most of the things you are talking about aren't about static typing in itself, it seems like you are insinuating that the arguments for dynamic typing systems come from developers who "didn't bother to [...] because they are lazy" but for the main arguments which imo are:
Quicker to read because less type clutter to distract and stretch one's view [easier to understand and reason about the code]
MetaProgramming [and high level generic functionality in general] easier and simpler because you don't have Nanny State typing system complaining
Better reuse because less likely to be tied to complex, heavily-defined structures/types and easier to mock up replacements. (DynamicTypingAndReuse)
Easier to implement limping if needed by the domain (see LimpVersusDie).
[not listed in the article] Data driven stuff, closely tied with metaprogramming
These are all related to "metaprogramming" / data driven model, or in general to implementing some small functionality that can be used generically everywhere, using static typing for this can turn a 3 hour long solution to something that takes 3 days, the code is convoluted, and the result might even not compile if all requirements are supposed to be met, or it will have to resort to non statically typed mechanisms like reflection.
And that's because static typing doesn't scale, when it comes to the functionality of adding a few keywords and these making guarantees of what the typed element will behave like. And if you do something complex enough you can easily get in a situation where a small change will fire random cryptic build errors in unrelated parts of the code, and you won't even have a type system debugger to get you through it (it's part of the limpversusdie thing)
That said I still prefer static typing but only because the code navigation is better, and if you don't overuse the typing system (with generic constraints or something) then static languages make the program easier to reason about, because they allow you to use stuff like find all reerences or go to definition.
8
Jun 12 '16
MetaProgramming [and high level generic functionality in general] easier and simpler because you don't have Nanny State typing system complaining
That's wrong. I'm more confident that my abstractions are rock-solid (i.e., don't leak) when I use static types. But, ultimately, how well a language facilitates abstraction is a property of the whole design, rather than the type system (or lack thereof). There are both static and dynamic languages that lend themselves to abstraction (e.g., Haskell and Racket), as well as static and dynamic languages that don't (e.g., C and JavaScript).
→ More replies (17)9
u/tejp Jun 12 '16
Quicker to read because less type clutter to distract and stretch one's view [easier to understand and reason about the code]
That's like saying normal text is easier to understand without punktuation. Types provide concise additional information that make it easier to understand what the code does.
var s;requires you to look at the rest of the function to figure out what that variable does,var s : set;immediately tells you that it is a set, making it quicker to understand.And if you are really not interested in the types, they are usually different enough syntactically that you can ignore them at a glance. What are type signatures and what not isn't something you think about after getting used to the language a bit.
→ More replies (10)1
u/pipocaQuemada Jun 13 '16
Quicker to read because less type clutter to distract and stretch one's view
You're mixing static typing up with manifest typing.
2
u/Tarmen Jun 12 '16 edited Jun 12 '16
You can do some sort of static duck typing or just good enough type inference, though.
I really don't like to add some interface just because a handful methods have to work with both a data structure and some mock for testing. But I also really don't like working on larger projects in dynamic languages so I am a fan of more inference in the newer languages.
2
Jun 12 '16
That's nonsense though. If something needs to change, I don't want to keep track of that in my head across the codebase, I want the compiler to yell at me because something obviously just broke.
And if something is broken because I didn't consider some rare edge case, I want a compile time error, not a 3am phone call that production is down because I forgot to handle if you pass in an int instead of a list and some fucker wrote code that returns a single value instead of a list of one element etc...
1
u/im-a-koala Jun 12 '16
That sounds to me like "I like being able to write code without actually knowing what the code should be doing." Which is pretty awful.
2
u/kcuf Jun 12 '16
Dynamically typed languages are good for small scale projects because you can work fast, but the break down at scale because you can't keep the assumptions consistent across a large surface area. Not having to solidify your models allows you to be more explorative, which is great when you just need to get a task down (like you're writing a script). Having things like "truthy" types also allows for more conciseness, which goes a long way when trying to reduce the surface area and move more quickly -- without conciseness, the noise becomes a distraction and you can't mentally follow the types. As well, dynamic typing can allow you to work in a more functional way where you utilize highly generic orthogonal functions to build up your logic -- this is also how you work in haskell, but I think it's an easier thing to accept in dynamic languages because you're more likely to fit many concepts into one actual type (like a string).
5
Jun 12 '16
you can work fast
Can you though? I often find myself having to go read the source code of whatever library I want to use because it's fucking python and people can't be bothered to document the fucking return types of their functions.
2
u/kcuf Jun 12 '16
I don't particularly like python, but in clojure I don't find myself needing many libraries, but when I do, quite often they're wrapping a Java library I know, or they have good docs.
2
u/wlphoenix Jun 12 '16
I usually wind up leveraging the REPL before I go to the source code.
type(),dir()andipython's?,??, and auto expand for object functions make it pretty easy to figure out what I can do with the output.7
u/argv_minus_one Jun 12 '16
Dynamically typed languages are good for small scale projects because you can work fast
Static type inference gives you that, without the problems that dynamic typing introduces.
Not having to solidify your models allows you to be more explorative
Only if you're exploring the art of writing programs that don't work correctly…
which is great when you just need to get a task down (like you're writing a script).
Yeah, no. When I'm trying to get a task down, the last thing I need is the chaotic, unpredictable behavior of a dynamic type system. This very thread is about an example of that problem.
Having things like "truthy" types also allows for more conciseness, which goes a long way when trying to reduce the surface area and move more quickly -- without conciseness, the noise becomes a distraction and you can't mentally follow the types.
Truthiness does not help mentally follow the types. If anything, it does the opposite: introduce type conversions where you won't expect them (unless you're a highly-skilled, eagle-eyed language lawyer).
As well, dynamic typing can allow you to work in a more functional way where you utilize highly generic orthogonal functions to build up your logic -- this is also how you work in haskell, but I think it's an easier thing to accept in dynamic languages because you're more likely to fit many concepts into one actual type (like a string).
Oh God, stringly-typed programming. I'm not even sure where to begin describing how horrible an idea that is.
No. Dynamic typing is useless. It is a poor man's workaround for the failings of some languages' static type systems. For example, many statically-typed languages cannot express union types. But the correct solution to that problem is a better static type system, not a dynamic type system. Even in small scripts, give me static types any day.
2
u/kcuf Jun 12 '16
Ok, you can do whatever the fuck you want.
I like some strong statically typed languages (haskell is my preferred language, scala's fun as well), and I like clojure for small things -- I don't like any other dynamically typed language, but it works well with clojure, so I recognize that it can be useful in a language.
If you write your scripts in Java, then we're basically from two different universes.
1
u/argv_minus_one Jun 12 '16
If you write your scripts in Java
2
u/kcuf Jun 12 '16
Scripting in scala is a completely different thing than scripting in java. I like using scala, and writing scripts with it is perfectly reasonable -- pop open a repl, throw some commands together and save it. It's a very flexible language.
I've had people try to convince me that writing scripts in java is a reasonable and enjoyable thing to do, and I can only assume that they're masochists.
1
u/kcuf Jun 12 '16
Truthiness isn't really type coercion, it's just a convention that conditionals treat everything other than nil or false as true. It allows for doing things
(if blah then else)instead of
(if-not (nil? blah) then else)You are loosing information in the code, but it is something that you can easily adapt to and that doesn't generally introduce errors in clojure.
It's also nice to things like
(or value1 value2 value3)To get the first non-nil, non-false value in the listed values.
→ More replies (2)2
Jun 12 '16
when crossing language/system boundaries. for example mapping the types in a sql db implementation to easy to use accessor interfaces in the client language. dynamic languages like ruby and python do this more easily than c++ or ocaml.
6
-6
0
Jun 12 '16
[deleted]
15
u/abhrainn Jun 12 '16
With a static language, you couldn't even get that half-breed mess to compile.
Which is a good thing because that mess will crash. At least a statically typed language will refuse to compile it.
4
u/codebje Jun 12 '16
Use modules or packages or some other smaller unit-of-compilation to test your changes?
Sure, you can't build and assemble the whole program, that's the feature of static type systems. The whole program is a busted mess. The parts you've updated should be testable in isolation, though, and you won't accidentally miss a call site in one place because, hey, your language lets you run a broken mess.
3
Jun 12 '16
With a static language, you couldn't even get that half-breed mess to compile.
How is this anything but a benefit?
2
u/im-a-koala Jun 12 '16
Huh? Wouldn't you just add new methods and deprecate the old ones? I don't get it. This seems possible with both statically and dynamically typed languages.
0
Jun 12 '16
[deleted]
6
u/im-a-koala Jun 12 '16
Why?
I'm assuming you're not changing function names - if you were, then you'd have to change the code base in a dynamic language too. (Except there's no way to correctly do this in a dynamic language, another downside.)
If you're changing the type, you don't need to change anything if you're widening the type.
You have some other options:
Create a new function with a new name for the new interface.
Rename the old function (yes, you have to rename it for every line - but virtually any IDE will do this for you).
0
Jun 12 '16
[deleted]
5
u/im-a-koala Jun 12 '16
I don't break interfaces often, but when I do, I don't think a "Ctrl-R, R" and typing in the new name is any problem. It's way easier than changing the name of a function used throughout your dynamically-typed project.
35
u/serrimo Jun 11 '16
I'm a clojure noob so I can't say much about the validity of his claims.
However, I find it strangely reassuring that those are his "only" concerns of the language. If inconsistencies in the set namespace implementations, weak protocol support and a less-than-stellar clojure.test are his biggest complaints; then I've used much worse languages.
→ More replies (3)40
u/everywhere_anyhow Jun 11 '16
I dunno....one of his complaints was that there are wrong data errors in core libs that have been known for years, which the core team considers won't fix, and that they prioritize new development over maintenance. That doesn't sound OK
0
Jun 11 '16
[deleted]
22
u/dacjames Jun 12 '16
Because they return incorrect results when passed the wrong arguments, so, in their view, the problem is with the user, not the library. Not defending the lack of a respectful response but there is logic in not inserting runtime checks for bad arguments. Take that too far and you'll end up implementing a runtime "type" system in bits and pieces all over the place.
39
u/badaw Jun 11 '16 edited Jun 11 '16
To say that I was treated pretty shabbily by David Nolen on this issue almost goes without saying.
David Nolen's only comment on that issue before closing it:
Not going to fix this, the documentation is very clear that everything in the app state must be an associative data structure.
This is shabby treatment? Have you seen the shit that gets thrown around on other open source projects? Nolen gave a reason for closing the issue as WONTFIX without calling you names, cussing you out, or anything of the sort. What more do you want?
39
u/i_am_broccoli Jun 11 '16
Shabbily, yes, because Nolen offered no opportunity for discourse. The author chose his word carefully. Your reasoning here is tantamount to "Have you seen the shitty state that everything else is in? Stop your bitchin' because you've got it relatively good." If everyone had that attitude nothing would ever change or improve.
18
u/lgstein Jun 11 '16
As if everybody raising an issue had a right to discourse.
19
u/everywhere_anyhow Jun 11 '16
They don't have a RIGHT, but wise projects ought to act like they do, because open source is nothing without the willingness of its partners and contributors. It's not like they do it for the Bucks.
People don't have a right to be treated well but that's also missing the point
2
2
u/tejp Jun 12 '16
Of course there is still opportunity for discourse, he could still comment on that github issue and argue his point and try to convince Nolen of his point of view. If he's convincing enough he might get the issue reopened.
-2
Jun 12 '16
offered no opportunity for discourse
The folks from Cognitect have heard every argument you're going to make on the topic. To say they hear criticism of those initial design decisions in Clojure is an understatement. Some feature X only works with an associative data structure and it could easily be extended to work with lists is a very common Clojure debate for good reason. I know because I've argued that clojure's
contains?and subsequently the entireclojure.setnamespace is a massive source of bugs in application level logic whenever new Clojure developers use it.I'm with OP that this is extremely frustrating, but I'll take someone that takes breaking backwards compatibility extremely seriously over the alternative approach employed by the Scala world where every single library is forced to maintain a version for each scala version.
1
u/KagakuNinja Jun 13 '16
The Scala world does take backwards compatibility seriously. I recently upgraded some projects from 2.10 to 2.11, with no need to change any code; I did have to upgrade the libraries and recompile.
What you are complaining about is that Scala is not binary compatible across major versions (minor versions are binary compatible). I don't remember exactly why this is the case, but it isn't because they "do not care". The Scala guys understand this is a problem, and they are researching a solution with the experimental Dotty compiler.
-24
28
u/kcuf Jun 11 '16
Clojure is really just a scripting language for the jvm. It's homoiconic and dynamically typed, so we can move fast; it favors immutability, so we can reason about the code and refactor with a bit more ease; it's on the jvm so you can utilize existing platforms -- but, just like any other dynamically typed language, it won't scale as well to situations requiring consistency, absolute correctness, and broad diverse scope. In these situations, type systems and other formal verifications become necessary. For the jvm, I recommend scala, but if can use it, then something more like Haskell can be even more enjoyable.
Clojure has a purpose, and it is more akin to the ruby, python, JavaScript world, but with the power of immutability, homoiconicity, and the jvm. In this world, most of the issues mentioned aren't generally considered issues, more just annoyances.
9
u/Milyardo Jun 11 '16
I never thought the scripting experience in Clojure was an improvement over Scala. What makes Clojure so great as a scripting language?
10
u/kcuf Jun 11 '16 edited Jun 11 '16
Scala is like a scripting language with a beast of a type system. That said, scala still follows the "everything-is-an-object" nature of Java, where you have to define everything in a class or object. In clojure I can just create top level functions and pass them around... This isn't much different than scala, because clojure name spaces are essentially singletons... But working that way ( everything is a singleton) in scala just makes me feel guilty (which is my own problem).
The other part of too, is that clojure embraces its dynamic nature more so than scala (like making dynamic function lookup trivial) and also embraces dealing with data in generic structures (like hash maps instead of pojos), which makes development quicker (albeit, at the cost of making things less clear or less well defined).
0
Jun 12 '16
[deleted]
1
u/kcuf Jun 12 '16
I agree.
I like clojure, but I use it for a specific purpose -- I don't want to use it in a large scale context because the lack of types, and dynamic nature make it less understandable.
→ More replies (3)7
Jun 11 '16
How easy and fast (also considering function call time) is it to do Java - Clojure and Clojure - Java interop? I.e., could one script soft-realtime applications written in Java/Scala/Kotlin/Whatever with Clojure?
Thanks in advance!
14
u/kcuf Jun 11 '16 edited Jun 12 '16
Super fast and easy! We primarily use java at my work, so when I need to write a script, Clojure is my go to because it can utilize everything.
Need to dump shit on SQS?
(let [sqs (AmazonSQSClient. credentials-provider) entries (map-indexed #(SendMessageBatchRequestEntry. %1 %2) my-list-of-data) batches (partition 10 entries)] (doseq [batch batches] (.sendMessageBatch sqs queue-url batch)))This will do batches of size 10 -- the limit of SQS
7
4
u/jssjjssj Jun 12 '16
As an old Common LISP enthusiastic, seeing Clojure syntax always makes me shiver. There's [], there's %, there's #.
I guess the original design point was to distinguish some blocks from others by changing the parentheses to square brackets, but man, does it look different from a traditional Lots of Irritating Superfluous Parentheses.
4
u/kcuf Jun 12 '16
I never used common lisp, but there are certainly a handful of syntactical elements in clojure, but they're generally for your convenience -- # is the reader macro for fn, and % is just the anonymous argument.
Perhaps it's a bit lower level than lisp, but clojure forces you to deal with the distinction between lists and vectors for performance reasons, hence the extra syntax [].
1
u/jssjjssj Jun 12 '16
Sure, Common LISP has those too. ' is the reader macro for (quote), etc. And like I said, there obviously must be reasons for the syntactic choices.
What I was expressing was personal preference, not critique towards those choices.
1
u/kcuf Jun 12 '16
Clojure has ' and ` as well. Does Common LISP have the analog of all the # macros? ( #(...) is for fn, #"..." is for regex, etc).
1
u/ehaliewicz Jun 13 '16
They're not defined in the standard, however you can write them yourself with reader macros.
2
u/Nowaker Jun 11 '16
The difference is you won't end up with bad data in Ruby. But you may in Clojure.
10
u/kcuf Jun 11 '16
This is just sloppy handling of undefined behavior. Not throwing an exception, or some error state, when an undefined use case is met is laziness on clojure's side -- but I'm sure you can find undefined (or unintuitive) behavior in ruby, because it's part of the nature of dynamic languages: you can't cover all the cases, and this is generally by choice! otherwise, you're too restrictive and limit the benefits of choosing a dynamic language!
4
u/Spfifle Jun 12 '16
There's no way to prevent a person truly intent on screwing themselves over from doing so in any language, and trying to scrub all such ways out is worse than wasteful because you compromise the functionality for people who really do need to do that dumb thing. In the author's example it's probably not a bad idea to fix it obviously.
tmp = isinstance isinstance = lambda obj, cls : isinstance.old(obj, Person) or isinstance.old(obj, cls) isinstance.old = tmp class Person(object): def __init__(self): pass globals()["tim"] = Person() isinstance(tim, int) >>> True2
u/kcuf Jun 12 '16
Ya, at some point it's a lost cause, only resulting artificial limitations that provide limited benefit and extra maintenance.
9
Jun 11 '16
Judging from the comments in the original link, there are people past your point, OP.
Next on the news: Can Jaunt become the Neovim of Clojure?
15
u/netbioserror Jun 12 '16 edited Jun 12 '16
ITT: Lots of people confusing strong/weak typing with dynamic/static typing. Lots of opinions of questionable quality in here. Here's a rundown of typing methods:
Strong typing means values are of specific types that can only be used in well-defined ways. Weak typing means data is loose and can be used in different ways. In Clojure (strong typing), an operation that expects an integer can only operate on an integer, and will throw an error if fed anything else. In C (weak typing), an integer can be passed around and used as an integer, a pointer, or a character, depending on the strictness of the compiler; if not strict, it won't complain at all.
Dynamic typing means that the types of identifiers and parameters are flexible. Static typing means they must match 1:1. In Clojure (dynamic typing), a function that takes one parameter and operates on it as if it were a collection can operate on any kind of collection passed in, but if an integer is passed in, the function will fail at runtime. In Java (static typing), the function's argument must have a type; if it expects a List, passing it an integer will throw a compile-time error.
Clojure, Ruby, and Python are dynamic and strongly typed.
Java, C#, F#, Ocaml, Haskell, and Rust are static and strongly typed.
C and C++ are static and weakly typed.
JavaScript is dynamic and weakly typed.
Type annotations != static typing. For example, F# is statically typed but can be used without type annotations in most situations; this is known as type inference, where the compiler tries to figure out the type of the identifier given the context and hold the programmer to that type.
2
u/im-a-koala Jun 12 '16
In C (weak typing), an integer can be passed around and used as an integer, a pointer, or a character, depending on the strictness of the compiler; if not strict, it won't complain at all.
While this is certainly true per the C standard, most (all?) modern C compilers will warn strongly about any behavior like this. It's certainly not idiomatic C and the tools help you easily avoid pitfalls like that.
I'm pretty certain Ruby has implicit type conversion as well - if you write:
"test" + xand
xis an integer, it will get implicitly converted to a string to be concatenated.In reality, the strong/weak typing distinction is really a continuum. You can't be all the way to the "weak" side because it's impossible to implicitly convert anything into everything else. But most languages aren't way to the "strong" side either. Most languages are in the middle.
This is in contrast to the dynamic/static typing distinction which is quite black-and-white.
4
u/Hueho Jun 12 '16
I'm pretty certain Ruby has implicit type conversion as well
Not really:
sh-4.3$ ruby -e "puts 'test' + 1" -e:1:in `+': no implicit conversion of Fixnum into String (TypeError) from -e:1:in `<main>'For most part Ruby sometimes define weird conventions like numeric methods on the core classes calling
coerceon the right operand and exceptions may be treated as strings if they implementto_str, but they are documented, mostly ignored and rely solely on public language features, so it's easy to patch it out.EDIT: to demonstrate the coercion feature, it's actually mostly used for compatibility with other numeric types. String for instance does not implement it:
sh-4.3$ ruby -e "puts 1 + 'test'" -e:1:in `+': String can't be coerced into Fixnum (TypeError) from -e:1:in `<main>'2
u/quicknir Jun 12 '16
Pretty debatable that C++ is weakly typed. Obviously many bits are compatible with C, but the typing is stricter even on the C parts (void* to other pointer types for example). Everything that's not part of C is strongly typed by any reasonable definition. Implicit conversions can occur but only when explicitly defined.
And your example for C isn't even correct; an integer cannot be passed as a pointer at any compiler level, it's just not legal C. Only a constant expression evaluating to 0 will implicitly be converted to a pointer.
1
u/JW_00000 Jun 12 '16
Is Clojure (and its standard library) actually strongly typed?
Compare Python:
>>> {1,2,3} | {4,5,6} set([1, 2, 3, 4, 5, 6]) >>> {1,2,3} | [4,5,6] Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported operand type(s) for |: 'set' and 'list'And Clojure:
user=> (clojure.set/union #{1 2 3} #{4 5 6}) #{1 4 6 3 2 5} user=> (clojure.set/union #{1 2 3} [4 5 6]){1 4 6 3 2 5}
The documentation of union only mentions sets; while it accepts (some) other types without throwing errors.
1
u/JW_00000 Jun 12 '16
Is Clojure (and its standard library) actually strongly typed?
Compare Python:
>>> {1,2,3} | {4,5,6} set([1, 2, 3, 4, 5, 6]) >>> {1,2,3} | [4,5,6] Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported operand type(s) for |: 'set' and 'list'And Clojure:
user=> (clojure.set/union #{1 2 3} #{4 5 6}) #{1 4 6 3 2 5} user=> (clojure.set/union #{1 2 3} [4 5 6]){1 4 6 3 2 5}
The documentation of union only mentions sets; while it accepts (some) other types without throwing errors.
2
u/netbioserror Jun 12 '16 edited Jun 12 '16
Likely because
unionis constructing the set union expecting only a collection/sequence. So the function doesn't care if it gets a list, vector, sequence, or possibly even a map. But it has to be a collection which can be iterated over. This is still strong typing using interfaces to expose common, generic mechanisms.For true weak typing, let's imagine a very lenient C compiler. Say we're passing in a pointer and its size as two parameters, similar to how one would pass in an array, and the function simply assuming it's an array. If that pointer was not to an actual array or the size isn't correct, the
unionfunction could iterate over all of the contents of memory until it breaches its sandbox, makes an illegal access, or some undefined memory operation which the OS will intervene to stop. In a strongly typed language, collections are first-class types with strict access limitations and iteration mechanisms to avoid such errors.
2
u/paul_h Jun 12 '16 edited Jun 12 '16
Maintain a fork for a while. Outcomes can be good - http://www.theregister.co.uk/2015/09/09/node_js_v400_reunites_with_io_js/
Doesn't have to be a one-man activity - there will be plenty of others with similar bitternesses who'll find a way to the Flojure project.
6
u/kankyo Jun 11 '16
This sums up my experience too. I'm happy I'm still doing Python full time and could bail on clojure before I had that much invested.
7
u/maestro2005 Jun 11 '16
Some of these seem pretty petty. I get that it's like death by a thousand cuts, but all of these are easily worked around.
union returns duplicates if some of the inputs are lists
Why are you trying to call union on lists? Sets and lists are very different data structures and you should be cautious when you need to convert between the two.
Rich Hickey said in 2009 “the fact that these functions happen to work when the second argument is not a set is an implementation artifact and not a promise of the interface”.
What he means is that the set functions are only defined for sets; calling them with other structures is undefined behavior.
List and Vector are both seqs, but into for a map only accepts vectors
This one is kind of silly, but it's because the implementation code uses get to pull out the values of the k/v pairs, and that doesn't work on lists. If you have a sequence of lists that you want to put into a map, you can map vec over it first.
lists causes a ClassCastException. This is kind of nuts because an IllegalArgumentException makes more sense
This is just part of Clojure's philosophy. Define what's supposed to work, and leave everything else as undefined behavior. The exception that gets thrown is not part of the spec. You shouldn't be relying on specific runtime exceptions anyway.
26
u/dmpk2k Jun 11 '16
What he means is that the set functions are only defined for sets
At the very least that deserves an assert then.
39
u/BufferUnderpants Jun 11 '16
I like Clojure, but seriously, standard library functions receiving the wrong types and producing garbage output is the sort of things we, rightfully, bash PHP for.
47
u/crusoe Jun 11 '16
Undefined behavior. Because it worked so well for c!
18
u/argv_minus_one Jun 11 '16
C at least has the excuse of being low-level, almost assembly, primarily for nuts-and-bolts systems programming. Clojure has no such excuse.
2
u/lgstein Jun 11 '16
Of course it has. It is dynamically typed. As such it can't detect many errors at compile time.
1
23
u/argv_minus_one Jun 11 '16
This is just part of Clojure's philosophy. Define what's supposed to work, and leave everything else as undefined behavior.
That sounds like an excellent argument against using Clojure at all.
-7
0
Jun 11 '16
[deleted]
5
u/maestro2005 Jun 11 '16
Are you referring to me, or the community? I'm not a Clojure zealot by any means. I generally like it, but it does have its quirks. If you're referring to the community, then this is pretty typical for dynamically typed languages.
15
Jun 11 '16
I personally expect Python or Ruby to error when something does not fit in right. Silent, undefined behavior is really not excusable at such a high language level.
-7
Jun 11 '16
the TL;DR needs real type system
18
Jun 11 '16
You could argue that. I personally wouldn't. Clojure is dynamic and trying to change it static is a waste of everyone's time. You'd be far better served starting off with a statically typed language if that's what you think is best.
I think I'm really more bothered by the actions and attitudes seen on the Clojure Jira than anything else. We could argue back and forth about what the correct solution is, but a consistent response of "This isn't a problem, read the docs" and utter silence worries me far more than the exact details of how a given function works.
4
u/kryptomicron Jun 11 '16
Utter silence following a consistent response seems more than reasonable, even tho I agree that the things you highlighted would be ideally fixed or made more friendly.
5
4
u/karma_vacuum123 Jun 11 '16
if it had one, you might as well just lose the lispy syntax. the whole point of a strong type system is to have a reference definition for structures used in the program...but then you lose all the neato features a lisp can deliver through ad-hoc, dynamic structuring...s-expressions effectively go away and all you have left is parens as syntax
5
u/snaky Jun 12 '16
There's nothing in Lisp syntax that prevent anything type-related. Typed Racket have statically-checked type annotations and contracts, many Common Lisp implementations (e.g. SBCL) have gradual typing, often statically checked and type inference
-4
u/yawaramin Jun 11 '16
The issue of the set union not being guaranteed to work, e.g., when the second argument is a list--why not just convert it to a set before passing it to union? That's how we roll in the statically-typed world and it's not such a big burden.
19
Jun 11 '16
Here's why I filed the bug.
It's surprising and undocumented.
Data bugs are really really nasty. I'd rather have an exception.
There's no hard and fast reason why it should actually work the way it does. Exceptions or coercion make more sense than the wrong data-type with the wrong values.
Why I wrote the blog post is because I'm annoyed about how they respond to bugs. For me this is really the big issue. I fixed the set/union thing in my code by using sets, easy peasy. But leaving behind a landmine for the next engineer and dismissing it, and other similar bugs, as non-issues really rubs me the wrong way.
3
u/TheLastSock Jun 11 '16 edited Jun 11 '16
Are you the author of the article? I feel like one of us have a misunderstanding. You claim that...
And the namespace is completely riddled with bugs. union returns duplicates if some of the inputs are lists instead of sets depending on their length.
to be clear you/he is referring to this:
try-spec.core=> (clojure.set/union [1,2] [1,2]) [1 2 1 2]Note: Though im not sure what "depending on their length means".
for the above bugs there are two possible fixes: raise an IllegalArgumentException if anything other than sets are provided
Isn't this an argument for types? Wont this kind of problem be prolific in any dynamic language? What is the union of anything besides sets?
coerce lists and vectors to sets before continuing
This only sorta makes sense for very similar data. How do you coerce a map into a set? Is it based on keys or values? What about a string? is it based on the whole string or the characters. Now your coercing data for the user in ways they wont expect...
[edit: remove python example, both wrong and misleading]
The problem is that we have handed the union function the wrong type of arguments. That it fails in further down stream is the trade off we make with dynamic languages. The community seems to admit the trade off and alleviate it with things like clojure.spec. Im not mental equipped to argue type theory here. But i suppose i feel this is an ancient argument and saying its a "bug" seems... simplistic.
How you define getting the wrong type with nonsense values counts as “working” is beyond me. Is it just because it doesn’t throw an Exception? Anyone here prefer bad data instead of exceptions when dealing with functions like this? I doubt it.
This is maybe the deeper problem. You would expect union to fail given the wrong types. Sure the failure wont be a type error but it will be contained inside the function. Leaking out the wrong data (anything at all imo) means its harder to debug. I'm generally curious how and why set would work on lists at all.
As to the rest of the arguments made here. I don't know enough to hazard a guess. But i would appreciate any feedback on my interoperation of the above situation.
3
Jun 11 '16
Try the following examples.
(clojure.set/union #{1 2 3} [2 3])
(clojure.set/union [1 2 3] #{2 3})
2
u/TheLastSock Jun 11 '16 edited Jun 11 '16
I feel like I would have liked an error. But wasn't too surprised to get nonsense. Like i said in my reply, im general interested to know why this doesn't fail.
In alexs response he seems to be stating the reason is performance:
Previous tickets in this area have been declined either because that was the stated approach or because performance would be affected by either checking for bad inputs, or automatic coercion.
A point which i have no input on. Do you think the loss of performance would have been worth it? or was there another way? Those are pretty big questions i doubt its worth our time digging into them!
Thanks for your post btw (sorry i double posted on HN and here), I learned a lot reading the discussion between you and other more experienced members of the clojure community. I can see why you might be frustrated with how union works. Its not particularly forgiving!
2
u/Tiwazz Jun 11 '16
How do you coerce a map into a set? Is it based on keys or values?
Yes. It would have to be a set of key->value tuples, anything else would be lossy.
What about a string?
Naively a set of characters :x. More generally I'd say calling the set constructor on a scalar should return a set of just that scalar. My preference for strings would be that if you want the set of characters you convert it to a list first.
All of this should defer to the behavior of the set constructor though. And the authors argument is that the following should be equivalent.
; prevent nested sets :v (defn maybe-set [s] (if (set? s) s (set s))) (union s l) (union (maybe-set s) (maybe-set l))4
u/TheLastSock Jun 11 '16
Thanks for your input! I honestly haven't ever thought though this type of problem before.
Yes. It would have to be a set of key->value tuples, anything else would be lossy.
That seems reasonable. But so might another argument for it coercing a map into just the keys and eliminating duplicates. Thats more in line with what happens when you "combine" two maps ..right?
What i'm unsure about here is that we can arrive at a set of behavior that isn't going to be unreasonable for some situations. Maybe thats ok. Maybe those would be better then what happens right now. But then these changes feel more like feature changes rather then bugs.
To add to the discussion. Alex Millar chimed in with some information in regards to the current design choice:
clojure.set ops - currently take a garbage-in/garbage-out approach to input handling. If you call them with something other than sets, the results may be unexpected. Previous tickets in this area have been declined either because that was the stated approach or because performance would be affected by either checking for bad inputs, or automatic coercion. When you filed those tickets, I linked to the older work but you'll notice that I left your tickets open, because I hope to come back to these in a bit. Since the older tickets were filed, the state of the world has changed. In Clojure 1.7, one of the penumbra effects of the transducers work was that we made the
setfunction for coercion much faster, particularly when passed a set, making it a much better option particularly for coercion. In Clojure 1.9, the spec work may allow us to spec those functions and catch those errors at development time with no impact to production time. Note how both of those are exactly the recent "greenfield" features you mention as not being relevant to you, yet they are enabling the thing you want.I suppose I had taken it as a given that dynamic languages didn't do type checking for me. In that regard the introduction of clojure.spec has really open up new possibilities. I need to dig into that more and understand the implications vs what i understand about typed languages.
1
u/Tiwazz Jun 11 '16
What i'm unsure about here is that we can arrive at a set of behavior that isn't going to be unreasonable for some situations. Maybe thats ok. Maybe those would be better then what happens right now. But then these changes feel more like feature changes rather then bugs.
I totally agree on this. I don't think it's unreasonable for the set functions in a dynamic language to expect that you provide the right types since there is some ambiguity.
For example the keys in a map are unique by definition. So if I convert two maps to sets:
(let [a (set {:a 1}) b (set {:a 2})] (union a b) ; => #{[:a 1] [:a 2]} ;; expected (into {} (union a b)) ; => {:a 2} ;; probably since it's what merge would do to the original maps ;; but it's ambiguous since sets don't have a defined orderingI might want to have a list of all distinct key value associations from a bunch of maps, but once I have it there is no clear way to return to a single map.
But so might another argument for it coercing a map into just the keys and eliminating duplicates.
For this I would expect to be required to do:
(union (set (keys a)) (set (keys b))) ;; I could see an argument for making ;; keys return a set rather than seq since ;; they are a set by definition...I wouldn't want a type change to drop either the keys or values for me though. I would expect that:
(into {} (into #{} m))...would be safe and non-lossy in all cases.
*edit: formatting
0
Jun 11 '16
[deleted]
8
u/Hendrikto Jun 11 '16
Thank you. It's not a problem at all that it won't work with any type as long as it tells you so.
-7
u/unpopular_opinion Jun 12 '16
There is no point in trying to convince any particular community of your ideas, when that community has had a long history of ignoring ideas you were interested in.
If you do not agree with a particular community, you have the option of not associating.
The language itself is rather irrelevant; you could just implement your own version of Clojure, never tell anyone about it, and live a frustration free life.
So, the flaw is that you care about a particular language community and at the same time you are expecting them to change (kind of looks like a woman who expects a man to change, doesn't it?).
-2
u/Gotebe Jun 12 '16
the editor was the only weak point for Clojure
Um, what?! Editor is used to type text.
1
u/jssjjssj Jun 12 '16
Downvote for totally missing the point about the editors. Replace "editor" with "IDE" mentally if you really are having hard time understanding the article.
-1
u/Gotebe Jun 12 '16
Well, then author should have said "tooling", IDE is so much more than "editor".
2
u/jssjjssj Jun 12 '16
Perhaps. I personally understood his point perfectly despite the slight mishap in terminology, but it's obviously well within your rights to complain about it, should you consider the distinction that important.
0
Jun 11 '16
[deleted]
10
u/karma_vacuum123 Jun 11 '16 edited Jun 11 '16
the second coming of the "smug lisp weenies"?
rich hickey seems to like getting things about 70% right. everyone i know who has touched datomic absolutely loathes it....most people who touch clojure seem to dabble with it, hit a pothole, and move on
the biggest structure challenge for clojure these days seems to be the rise in strong static typing. you can add this capability to a language founded on s-expressions, but in that case it just becomes a matter of parens-as-syntax....the whole point of s-expressions is to be able to make new structures at will with great flexibility...which runs in the face of strong static typing
-1
u/pmf Jun 11 '16
the second coming of the "smug lisp weenies"?
There was usually some substance behind their smugness.
Clojurists, on the other hand, ...
2
u/drjeats Jun 11 '16
I don't know CL aside from basic things you get in Elisp.
Why would you say lisp weenie smugness had substance over Clojurist smugness?
From an outsider, it seems like they're both allowed some smugness because they each have/had some good ideas relevant to the programming problems of their time.
7
u/vattenpuss Jun 11 '16
Looking through your comment history, it seems you're obsessed with clojure and its users.
0
0
Jun 11 '16
[deleted]
22
Jun 11 '16
Either we've filed bugs on all these, or someone else has. The union one is new, but the bugs in intersection have been in limbo since 2009. If I felt these things would be resolved easily I would not have bothered to write the blog post.
14
Jun 11 '16
not quite that easy, people have tried that in the past but clojure people dont want to fix even broken behavior in the fear of breaking code that might rely on said broken behavior
16
u/Pand9 Jun 11 '16
clojure people dont want to fix even broken behavior in the fear of breaking code that might rely on said broken behavior
Don't we call projects like this "dead"?
19
3
u/silveryRain Jun 12 '16
Linus' core principle of kernel maintenance is "don't break userspace", even at the expense of keeping bugs around, and Linux is by no means dead.
4
u/kryptomicron Jun 11 '16
Huh? If anything, providing backwards compatibility for code that relies on broken behavior is a hallmark of large, active, successful, and long-lived projects.
Clojure is also developed by someone running a business supporting Clojure and Clojure code so the benefits for changes that break their customer's code would need to be very large to justify the real cost to them financially and in lost good-will too.
15
u/vagif Jun 11 '16
Moved on from clojure to haskell a few years ago. Found that haskell is a better lisp than any other lisp i have ever used (including CL)