10 ms·
Why I Hate Scheme
- mquander 17y agoHere's a cool thing you can do in Scheme if you feel depressed that nothing is written in Scheme: http://www.pawfal.org/fluxus/ http://www.pawfal.org/fluxus/ (P.S. I love Scheme and did everyday things in Scheme when I had the opportunity to for a while. But right now I'm really enjoying Clojure and I think that Clojure might replace Scheme for me, because of Java libraries, and because of the really concise, consistent, and pleasant syntax, especially for maps and functions.)
- techiferous 17y agoI've worked with Scheme quite a bit and I've concluded that it's an academic language, not a business language. It definitely lacks a large, vibrant community with mature libraries. There is also too much variation among the various flavors of Scheme which fragments the community. It also lacks good language constructs for managing large software projects (namespaces and such). You have to have a Scheme-enlightened text editor in order to be productive. Despite what people say, it's not as pure and minimal as you'd think (I think there may be five different variations of let). Instead of pouring a lot of effort into Scheme, let it stay an academic language. It's fine for learning about functional programming. I moved from Scheme to Ruby and haven't missed Scheme. Sure, Scheme macros are very powerful, but I found that the DSLs that you can create in Ruby are adequate. Ruby also has the advantage of being a multiparadigm programming language.
- lukev 17y agoI know people tend to say this as a response to everything around here, but I think it's genuinely a good response to this: You should try Clojure. It's cleaner than Scheme except for the pains that come along with the JVM, but those redeem themselves by giving you access to zillions of libraries (which was your other complaint). And it has a good community and an awesome benevolent dictator.
- techiferous 17y ago> You should try Clojure. Too late; I'm in the Ruby community and things are just fine here. :) But thanks for mentioning Clojure; I didn't realize its syntax was so Scheme-like. That's news to me. :)
- expeditious 17y ago> lacks a large, vibrant community with mature libraries > too much variation among the various flavors of Scheme which fragments the community > lacks good language constructs for managing large software projects It seems that those points are being recognized and worked on very seriously in R7RS. See http://www.scheme-reports.org/ http://www.scheme-reports.org/ > Instead of pouring a lot of effort into Scheme, let it stay an academic language. Well, the "Little" Scheme (working group 1) should still fit that bill. And the "Big" Scheme (working group 2) is supposed to fix the above problems you mentioned.
- KirinDave 17y agoSo: PLT Scheme is a great system with great FFI and a lot of really good libraries. It's flexible and has a very fast interpreter—approaching webkit's interpreter, even! But: “Objective-C is a great example of what is going on. Obj-C is a cool language that implements fancy message passing, but it has ugly syntax and doesn't really offer anything new to the average programmer (Python works just fine without message passing, doesn't it?).” What I can't stand is people who don't really understand their underlying languages start to talk about them. I mean, are you kidding me jlongster? Objective-C's system is bad but Python's system is okay? Why not say you love the taste of chocolate but hate the taste of cocoa? They're performing the same function for the runtime! I want to like Python, but its community of people who just refuse to understand how other languages relate to their favorite language really frustrates me. I'm not sure I can even count how many times a pythonista has challenged me, “What do you mean Python doesn't have real lambdas? _You don't even know Python!_” Given how important a community is to a language (see also: common lisp), it's difficult to overlook stuff like this.
- Davertron 17y agoI'm not really sure what you're talking about; his whole point referring to Objective-C was that the reason it's popular isn't because of any of its particular language features (i.e. "other languages are equally powerful"), it's popular because Apple took it and built a whole bunch of great libraries with it for its computers so that, if you want to program applications on a Mac, and you want to use things like Core animation and all of that, you're probably going to end up using Objective-C.
- deleted 17y ago[deleted]
- jlongster 17y agoI wrote that tongue-in-cheek. Objective-C is superior to Python in so many ways, but why is Python more widely used? The average programmer can get along fine with Python, and Objective-C just looks more complicated. I'm saying this from the view of a typical programmer. What is written in PLT, and who uses it? I'm not talking about great technology, I'm talking about putting that into practice. I use Gambit Scheme and I think it's the best system out there. But I'm challenging Scheme programmers to make great things, and put them to use, and give people a reason to learn Scheme.
- garply 17y agoI've been hacking Arc for a while now and we've been using calls to 'language servers' to deal with the poor library support. Basically, we wrap calls to Perl or Python up and send it via http to a local server that does nothing but eval the code and respond. That's gone a long way toward fixing the library problems (although it makes me, at least, less likely to develop actual Arc libraries since I can just wrap a call to Perl much more quickly). It's a relatively unique solution to the problem, I think. Unfortunately, the language is really fucking slow. I wish I had an interpreter written in C.
- lukev 17y agoIf you're doing method calls over HTTP+eval, then I'm very surprised Arc's speed is the choke point in your application.
- mquander 17y agoHmm, if it's on the local box and not actually going over a network, like the poster implied, I don't think it would be so bad; assuming it's just a call to do some oddball library thing here and there, and not in the computationally intensive portions.
- lukev 17y agoStill. You're likely to incur at least a few milliseconds of latency on the HTTP call, and most "eval" implementations I've worked with are prohibitively slow. I haven't benchmarked other languages, but I was using it in a Groovy app until I realized each call to eval was taking over 100ms. Even granting that Groovy is a dog, parsing from a string is non-trivial. At that point I'd ask myself whether it was worth the trouble.
- garply 17y agoWell, that would be problem if the eval'ed calls were short and frequently made, but I'm talking about code that doesn't make use of the lang servers. It is Arc that's slow. Of course, if I did have a problem with multiple http+eval calls, in many cases I could probably write what I wanted to do in the other language in batch, so the overhead would be quite small.
- rsheridan6 17y agoBe more specific. What exactly would you have had in, say, Python, that you didn't get in Scheme? What wheels did you reinvent?
- jcl 17y agoNot that it invalidates the article's points, but there's a certain degree of irony in writing a blog article about how no one uses Scheme and then posting it on a Scheme-powered website. :)
- jlongster 17y agoIt's supposed to be a witty and slightly tongue-in-cheek article :) Clojure is one of the best success stories, but I want more than just one. I want many products like Clojure.
- trzewiczek 17y agoI'm a self-taught programmer and artist working mostly in Java. I started to learn Scheme recently and it's just perfect - i'm so happy with it and it bring so much of joy. But the question of this post really rings in my head all the time - i will learn Scheme, i will learn functional programming, i will improve my skills and what then? It's obvious joy and programming in Java is easier now, but still... I spent days googling, asking and clusting the Internet looking for some real-world mature software written in Scheme. Not much in fact. And the discussion below shows that it is a problem, as there are no examples of real-world impementations. PLT is great and Clojure looks brilliant, but show me some software written in Scheme or Clojure, so i know. In the discussion you all just say that Clojure is great, but tell me what company, what business use it?! And tell me, where LISP is used nowadays as i'm concerning moving to LISP, if there is a real-world use of it somewhere (Emacs, Gimp and Audacity is all i know!).
- jcl 17y agoThere are a few typical examples that are given whenever this question comes up: - ITA Software does airline scheduling in Lisp. - Naughty Dog Software created a Lisp-derived scripting language for several of its games, including Crash Bandicoot. After they were acquired by Sony, their underlying technology was rewritten in more mainstream languages. - Paul Graham built ViaWeb in Lisp. (also rewritten after acquisition) - AutoCAD uses Lisp as its scripting language, and several other CAD providers have followed suit. But you are right: it isn't particularly popular. To use it commercially, you either need to be working alone, or you need to stumble into one of the few pockets of industry where it is used -- usually established by someone working alone. :) Here's an old-ish discussion on the subject: http://news.ycombinator.com/item?id=75126 http://news.ycombinator.com/item?id=75126 Clojure is probably too new to find many companies using it. They do have a jobs page, though: http://clojure.org/Jobs http://clojure.org/Jobs
- merimus 17y agoI've actually used scheme quite heavily in the past. (professionally). Simplicity + power = win! Could you give me some examples of what you mean? Are you talking about something like perl's cpan?
- expeditious 17y ago> Are you talking about something like perl's cpan? Everyone wishes their language could have something analogous to the CPAN. But before you can have that you need some standardization and community agreement in place regarding how modules are to work and be packaged up.
- merimus 17y agoWell... hopefully R6 will pull things together a bit. Personally I'm not a real fan of cpan. The qualilty is sort of hit and miss. I like python's approach better. The standard library is robust and broad enough to handle most things.
- expeditious 17y ago> Well... hopefully R6 will pull things together a bit. Do you mean "R7"? Because R6 seems to have actually done the opposite. > Personally I'm not a real fan of cpan. The qualilty is sort of hit and miss. The hit-or-miss quality is a necessary "evil" for having something as good as the CPAN. Yes, it's got a lot of crap, but there are a lot of gems that save many people a lot of work. > I like python's approach better. The standard library is robust and broad enough to handle most things. It has been said that the Python standard lib is where modules go to die. Guido himself has implied [^1] that modules in the std lib already have one foot in the grave. [^1]: http://tarekziade.wordpress.com/2010/03/03/the-fate-of-distutils-pycon-summit-packaging-sprint-detailed-report/ http://tarekziade.wordpress.com/2010/03/03/the-fate-of-distu... The future of successful general purpose languages is to have a small core with a vibrant external "CPAN". There just aren't enough core developers to maintain a large high-quality batteries-included standard library of modules. Much better is a dedicated loosely-coupled mostly active community of maintainers -- maintaining the bits that they are personally interested in (which is exactly what the CPAN has).
- azwhaley 17y agoI know how you feel James. I've been bashing away with Gambit for the last 18 months and whilst it's a great Scheme there's just too much missing. I wanted to build web apps, first there was no CGI library - luckily Black Hole came along, then there was no database library so I ended up writing a pure Scheme MySQL library because you couldn't call out to C without stopping all of your Gambit threads. As a bare minimum, it needs proper modules, it needs to be properly multithreaded and it needs more than about 6 people on the planet writing libraries for it. I've since switched to Haskell which has proper modules, proper multithreading and lots of libraries and may even be a better language than Scheme - if I could only understand what a monad is :-)