This looks like the other completely normal, idiomatic Clojure programs I've seen which manipulate a StringBuilder. And as Clojurians go I'm far to the succinctness/concision-preferring end of the spectrum.
I'm curious to see your core.async-based version :)
No: a Turkish keyboard has separate i/İ and ı/I keys, and Türkish-writing users with an American/international keyboard use a keyboard layout with modifier keys so that the i/I key can be altered to ı/İ. (I do the latter for idiosyncratic reasons.)
The person you're replying to is pointing out that differentiating English-i from Türkish-i requires some other unwieldy workaround. Would you expect manufacturers to add a third key for English i, or for people with Turkish keyboards to use a modifier key (or locale switching) to distinguish i from i? All workarounds seem extraordinarily unlikely.
>I suspect this is the real reason Clojure was created, I bet Rich was just really bored.
I notice too that a noticeable number of people pick up Clojure because it's new and shiny. As a longtime Clojurian I find that attitude can be disappointing to run into, like when you realize a growing friendship will die because they're not serious about living in your city.
I don't claim to know the man but the reasons Rich wanted Clojure are quite concrete, well documented, and rational. Java programs of the time were a particularly heinous form of OOP; we should not be surprised that a clever programmer would grow a preference for a dynamic, functional-first style. He found lisp superior (in interactivity, expressiveness, yadda yadda) and wanted to use it professionally.
To work in lisp required delivering something indistinguishable from a JAR (or other mainstream proglang executable). He had the realization that without immutable data structures baked into the language he'd always be subject to Other People's State.
If you think about these points logically they lead pretty straightforwardly to creating a (pragmatically) functional, dynamic, hosted lisp.
I distinctly remember in one of his talks he said words to the effect of “I wrote corporate C++ and Java for years and eventually realised I had to do something else, or else quit the industry”. So he took a year long sabbatical and created Clojure.
Rick wrote jfli, a Java foreign language interface for Common Lisp, before working on Clojure. He was a seasoned lisper, and he wanted to do something both modern and practical.
It's very interesting to go through the bookshelf he read during his sabatical. He was inspired by many languages aside from CL, including Mozart/Oz, AspectJ, and Prolog.
He didn't mean he'd quit out of boredom, he meant he'd quit out of frustration with proglangs that bite you in the ass when writing e.g. concurrent programs
I don't think the particular niche matters, eventually everything becomes being a mundane job.
I know few people that made it in shiny businesses (Serie A and Champions League players like Fabio Liverani and Simone Pepe, or Massimiliano Rosolino swimming gold metal at Olympics) and they all absolutely either hated or found 99.9% of their career an endless marathon of mundane boring activities.
I'm not saying there aren't plenty of exceptions of people that like their job, and jobs that may make it easier, but it looks to me that most of people find their job mundane and boring most of the time.
Agree. Although, as opposed to physical performance activities, be it sports or music, where one of the key activities is to repeat the same thing thousand times, in software, we strive towards not repeating the same thing.
He wasn't writing corporate CRUD apps, he was working on systems like radio broadcasting, voting machines, and Datomic, which involve significant concurrency challenges.
As verbose as Java is, it was even worse 20 years ago. If Kotlin, or C# 3.5+ were the OOP lingua francas at the time, maybe there would have been less need to create something else.
But still, "why not"? The first "alt-lang" I remember was "boo", on the dotnet platform. IDK if they actually meant to popularize it, but it had some cool features C# (and J#) didn't have, so, why not?
Terminology is never standardized. Language doesn't work like that. How, exactly, does one manage to exist in this world and not know that...?
However, outside of the Java world, which flips the terms around for some reason, this seems to be the prevailing usage. It is also the only usage that makes sense based on what seems to be the prevailing understanding of what "error" and "exceptional" mean. Java's "exceptional conditions" being the ones that you expect to happen regularly doesn't make sense, but was presumably an accident in naming that just so managed to stick.
Of course, confusion is compounded by some language idioms using exception handling constructs to handle errors.
>Exceptional circumstances, or exceptions for short, mean "things aren't working as expected due to programmer error".
Interesting. In Javaland this describes assertions, and the term exception is for operating errors, i.e. problems not necessarily attributable to programmer error, including your example of a network failure.
> In Javaland this describes assertions, and the term exception is for operating errors, i.e. problems not necessarily attributable to programmer error
Making matters more confusing in Javaland, Errors are separate from Exceptions, but both are Throwables.
An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch. Most such errors are abnormal conditions. The ThreadDeath error, though a "normal" condition, is also a subclass of Error because most applications should not try to catch it.
> Which of these are the "checked" exceptions? Throwables are checked exceptions, except if they're also Errors, which are unchecked exceptions, and then there's the Exceptions, which are also Throwables and are the main type of checked exception, except there's one exception to that too, which is that if they are also RuntimeExceptions, because that's the other kind of unchecked exception.
I tried making Dyalog bindings but wasn't smart enough to figure it out at the time based on the info available and I doubt much has changed regarding either my intelligence or information availability there. But it would be awesome!
>should functions return (value, error), or (error, value)?
a benefit of using maps with error keys :D semantic rather than positional destructuring. also avoids that needlessly obfuscatory Left and Right terminology for Either monads