12 ms·
I finally understand why I'm not allowed to use Lisp
- drivingmenuts 16y agoThis is a case where the author put his needs over the needs of the organization.
- acangiano 16y ago> I work in C# (worst language EVER!) You lose all credibility right there. C# is far from the worst language ever, and a pretty decent one among mainstream object oriented languages.
- city41 16y agoAs soon as I read that I looked for the date of the post. May, 2007. This is before C# 3.0 was released and chances are he was even using 1.0 based on impressions from his boss. C# isn't half bad now, but back then, I agree it was fairly crummy.
- barrydahlberg 16y agoIIRC generics came in 2.0 which narrows it a little.
- deleted 16y ago[deleted]
- j_baker 16y agoThis was very obviously a rant where the author was in a bad mood. I think some hyperbole can be forgiven.
- nyellin 16y agoAgreed. I would choose Python over C# for my own projects any day. However, I can't comprehend the senseless hatred that people have for C#. It is a nicer language than Java (imo) and it has very good performance. Furthermore, due to Mono, C# is no longer a closed platform.
- berntb 16y agoRe Mono: Microsoft is not suing Google for patents on operating systems but instead pressures the handset manufacturers using Android. Is there a guarantee that a customer can use Mono for commercial applications, without a shake down from Microsoft?
- nyellin 16y ago* Mono is backed by Novell and not Google * From the Mono Licensing FAQ [1]: "Microsoft has announced that the ECMA standards for C# and the CLI are covered under the Community Promise patent license. Basically a grant is given to anyone who want to implement those components for free and for any purpose." * The Novell-Microsoft agreements provide further protection for companies that choose to use Mono. [1] * Many companies are using Mono for commercial purposes. There is a list at http://www.mono-project.com/Companies_Using_Mono http://www.mono-project.com/Companies_Using_Mono * Notably, Linden Studios uses Mono for Second Life servers. (See http://wiki.secondlife.com/wiki/Mono http://wiki.secondlife.com/wiki/Mono) [1] http://www.mono-project.com/Licensing#Patents http://www.mono-project.com/Licensing#Patents
- gnosis 16y agoThere's been some criticism of Microsoft's "Community Promise", such as this: http://techrights.org/2009/07/09/community-promise-sham/ http://techrights.org/2009/07/09/community-promise-sham/ and http://www.fsf.org/news/2009-07-mscp-mono http://www.fsf.org/news/2009-07-mscp-mono and of Mono in general: http://www.fsf.org/news/dont-depend-on-mono http://www.fsf.org/news/dont-depend-on-mono
- kprobst 16y ago> techrights.org That's where I stopped reading, but I'll say this: Nowhere in the FSF's critique of the MCP is it mentioned whether or not the promise itself is legally binding. From a bunch of people who are supposed to be legal experts. What does that tell you?
- dabent 16y agoFamiliarity breeds contempt. Often it's the language that coders are currently using that seems like the worst, because they're dealing with that language's problems on a daily basis.
- mquander 16y agoYeah, I initially wrote a comment insulting him for not being able to figure out how to fold a list in C#, but the fact is, that wasn't in the standard library until late 2007, so I can sympathize.
- gnufreex 16y agoHe loses all credibility because he don't like you religio.. I mean language? Strange metrics of credibility. I disagree with you, therefore you have no credibility.
- acangiano 16y agoYou misrepresented my point. C# is far from my favorite language. He loses credibility however by making a statement which would appear wrong to any person with some knowledge of the programming language panorama. It's a red flag to either ignorance or intellectual dishonesty. Note that he didn't say, "C# is a language I don't like" or even "I find C# to be a horrible language", which would have been perfectly reasonable stances.
- jcromartie 16y agoI think I can explain the author's point of view. C# 2.0 was still the cutting edge for most of 2007. Most shops were still using 1.1. The author's qualm, coming from a Lisp POV, is most likely that if you are a consumer of C# 1.1 you can't just build C# 2.0 or 3.0 or 4.0 features. Using Lisp, he had access to everything that would eventually become C# features and then some, because if you want a fancy new language feature in Lisp you just add it. You don't have to touch the compiler (you write functions, macros, or a micro-compiler at the limit). So there's some hyperbole there, but it's true that C# 2.0 or 1.1 was really not anything special and felt a lot like "Microsoft's Java" at the time.
- robinduckett 16y agoAsked me to sign in to Google Groups. Closed tab.
- gnosis 16y agoTry: http://groups.google.com.nyud.net/group/comp.lang.lisp/browse_thread/thread/41c23db25ddcd899 http://groups.google.com.nyud.net/group/comp.lang.lisp/brows... or type the original link in to the form at: http://dongana.com http://dongana.com
- Helianthus16 16y agoI do not understand why giving feedback about the usability of the link deserves downvotes. I didn't even understand what had happened when I was suddenly at a google log-in, shrugged, and closed the tab.
- MortenK 16y agoFunny thing is, if it were a Facebook login wall, tens of upvotes would have ensued.
- robinduckett 16y agoI don't comment with the expectation of up votes. Infact, I commented that just to warn others that they'd be staring at a google-wall. Anyone else remember when you didn't have to log into google groups to look at a newsgroup thread?
- mkramlich 16y agolink redirects me to a login wall
- deleted 16y ago[deleted]
- gnosis 16y agoTry: http://groups.google.com.nyud.net/group/comp.lang.lisp/browse_thread/thread/41c23db25ddcd899 http://groups.google.com.nyud.net/group/comp.lang.lisp/brows... or type the original link in to the form at: http://dongana.com http://dongana.com
- deleted 16y ago[deleted]
- ddkrone 16y agoThe same can be said for any statically typed language. Any language that binds types as late as possible is infinitely more enjoyable to work with than one that fixes types at compile time. Short of developing missile guidance systems I don't think static types are warranted for anything.
- DougBTX 16y agoFor me type inference changes the picture, since it reduces the duplication you see throughout Java-style statically typed code, but doesn't give up all the benefits.
- ddkrone 16y agoThe only benefit I'm aware of is slightly faster code and even then the dynamic version is almost always more readable and easier to maintain and refactor. The ideal would be a dynamic language with optional static typing but I have yet to see a language like that.
- SapphireSun 16y agoPerl 6? http://en.wikipedia.org/wiki/Perl_6 http://en.wikipedia.org/wiki/Perl_6
- siika2000 16y ago> The ideal would be a dynamic language with optional static typing but I have yet to see a language like that. That would be Common Lisp.
- davidk0101 16y agoI'm waiting for perl 6.
- stcredzero 16y agoThat would be Common Lisp. There was such a version of Smalltalk called Strongtalk, but it never got a community behind it.
- DougBTX 16y agoI was going to tell him off for missing Enumerable.Aggregate, but then I noticed that he posted 6 months before that was included in the standard libraries, so I'm going to have to let him off.
- gsivil 16y agoI find nothing interesting in the original post to be honest. Just somebody that has a superficial impression about C# is complaining. Even the first 25 comments that I read are of no particular interest. Meta: I wildly guess the HN post gets all the upvotes because initally people think that it will be about a google employee not allowed to use Lisp in google.
- nyellin 16y agoYes, I also expected an official Google stance on using Lisp. I am new to HN, but I think you should try to read posts before you vote them up. At least that is what I do, after clicking on the comments page. Often, HN comments are even more valuable than the article itself.
- Johngibb 16y agoFor this reason, I wrote a chrome extension that shows more of the subdomain on hacker news: https://chrome.google.com/extensions/detail/amenlkcfjlmchdpogjmdolblcjlcmdbp https://chrome.google.com/extensions/detail/amenlkcfjlmchdpo...
- jimbokun 16y agoYou seem to have read an article about someone complaining about C#. The article I read was about someone complaining about not being allowed to use all the features in the language selected for the project.
- nostrademons 16y agoMeta: That would be this post: http://coding.derkeiler.com/Archive/Lisp/comp.lang.lisp/2006-04/msg01644.html http://coding.derkeiler.com/Archive/Lisp/comp.lang.lisp/2006... Which I think has been posted on HN before, Ron Garret's popped up a few times here, but it's still a great story.
- rorrr 16y agoKudos to his manager for actually looking at the code and recognizing the problem. Maintainable code is extremely important. Just keep your code simple. Adding another layer of abstraction instead of writing a simple and readable loop (if the language doesn't have accumulators) is not a good solution. I've seen this too many times. Smart developers write complex code, just because they can (and often it does make it shorter), but then mid- and junior-level developer struggle with it. So company has to spend more money on smarter developers. Here's a relevant post by Linus: http://thread.gmane.org/gmane.comp.version-control.git/57643/focus=57918 http://thread.gmane.org/gmane.comp.version-control.git/57643...
- rayiner 16y agoWhether your "simple loop" is actually simple depends on the complexity of the underlying problem. At a certain point, it takes less time to understand the abstraction + the code using that abstraction than to understand the fully-expanded code without the abstraction. If you're just adding up the elements of an array, no big deal use a simple loop. If you're iterating through three lists of potentially unequal length processing some triplets and skipping others and returning some data structure based on that iteration, a raw loop is going to be anything but simple and readable while using an abstraction like CL's LOOP is going to result in something very manageable. To give an empirical example off the top of my head, look at any compiler code written in C. Iterating over flow graphs is a big PITA because they're nested heterogenous structures (a procedure has basic blocks which has instructions which has uses and defs). You iterate over them a lot and a lot of iterations end up being complex triply-nested affairs. Nearly all compilers written in C use some sort of abstraction to deal with this complexity. Eg: GCC has a bunch of macros of the form FOR_EACH_ that use the pre-processor.
- alexeiz 16y ago> Kudos to his manager for actually looking at the code and recognizing the problem. In the majority of the cases however you deal with managers who lost understanding of anything but simple language constructs because all they did since becoming managers is management and no code development at all. At some point they start rejecting everything they don't understand. They justify their position by arguments of code clarity and maintainability. But they are misguided. To recognize readable and maintainable code you actually need to practice programming continually. I dealt with such managers. They would tell me that a dozen of simple code lines are unreadable because they saw a new keyword they don't understand. But they would accept a hundred of code lines that do the same thing in which they can recognize all keywords. They wouldn't care about what the code actually does, nor they would care about what it takes to parse a hundred lines of spaghetti code. It always fascinated me that some managers think they understand developing code better than developers they manage. I've had the best experience with managers that trust their developers to make decisions and the worst experience with managers that try to micromanage.
- S_A_P 16y agoOOOH I was so wanting to tell the OP What is so hard about this??? //assume some sorta IEnumerable derivitive IEnumerable<foo> bar = new IEnumerable<foo>() { obj1, obj2, obj3, obj4, ...}; var accumulator = bar.TakeWhile(x => x.property == someValue); but then I saw the .NET 2.0 timeframe. But even with .NET 2 you had generics which makes things pretty easy. But then again, he/she is ranting so I should just ignore him/her. It doesn't matter what language you are using, if you cant write something that is legible to solve the problem, think about it more.
- InclinedPlane 16y agoI suspect they were using .NET 1.x at the time, which would explain a lot.
- S_A_P 16y agoI initially thought that as well, but the post did mention generics.
- fhars 16y agoIf you had read the article you would have noticed that using generics the way they were intended to solve this problem was what he was called out for by his manager.
- j_baker 16y agoI learned something a long time ago. It's far, far easier to dismiss others' code as "complex", "unmaintainable", or "clever" than it is to try and understand the code well enough to figure out whether that code was written that way for a valid reason. It's true whether you're new and approaching a codebase for the first time or whether you're reviewing someone else's code. And no, I'm not saying that it's ok for code to be overly complex or unmaintainable. I'm saying that your first impression of code is probably wrong and you need to understand it before you dismiss it.
- rikthevik 16y agoI think really good high-level documentation would be a good place to start here. If someone looks at your code and immediately says "wtf", it seems like it would be good form to point them to a great piece of documentation. Without that, it seems unreasonable to ask your colleagues to dive into something well outside what they're used to seeing in that code base.
- Joeri 16y agoIt's always twice as hard to read code as it is to write code. For that reason alone, clever code is usually unmaintainable.
- raganwald 16y agoIt's always twice as hard to read code as it is to write code. True. For that reason alone, clever code is usually unmaintainable. How does this follow logically from the first statement? And more importantly, what alternative do you suggest? Are you positing that for a given problem, there is always some alternative solution that is "less clever" and "more maintainable?" If you've never seen folding and unfolding before, code that makes heavy use of "map," "each," "select," and so on looks clever. But in reality, it is simpler and less bug-prone than fooling around with for loops and off-by-one errors. To my eye, for loops are clever and unmaintainable. Moving up the scale, what about recursive combinators? https://github.com/raganwald/homoiconic/blob/master/2008-11-23/recursive_combinators.md https://github.com/raganwald/homoiconic/blob/master/2008-11-... They look very clever. But then again, rolling your own recursion from scratch every time you need it makes the person reading your code do a lot of work to figure out what you're doing. Is it "clever" to separate the concerns of how to implement recursive algorithm from the code that does something recursively? Or is it clever to roll your own code every time? WHat about parser combinators? Clever or not? How about rolling your own interpreter for a DSL? That's an official pattern from the GoF book. Can I do that and write maintainable code? Anyhow, I'm saying the same thing over and over. What is "clever?" Making use of a language feature or algorithm or well-known practice that someone else hasn't seen before and is too lazy to learn? And what is the alternative? Greenspunning the same functionality in an under-specified, bug-prone one-off way?
- enjo 16y agoI remember running into this early on at Quickoffice. I was tasked with essentially re-writing the entire application stack as the existing code was in pretty rough shape. C++ was mandated by the platform, but I spent a lot of time getting the STL and Boost up and running. The entire thing relied heavily on templates, including some of the more advanced meta-programming techniques. In each case the 'cleverness' was warranted as it greatly reduced the complexity and redundancy of the code. My boss at the time raised concerns over how maintainable this all was. How we're junior programmers going to be able to work on it? Being all of 22 I naively responded "well, lets just hire people who can handle it." Interestingly, that's exactly what we did. We were much more thorough in our hiring process precisely because we needed folks who could rise to the level of the code we had written. It seems to me that people (and companies) tend to rise to the level of the expectations that you set. In this case, making the decision to use LISP means that you're consciously making the decision to hire the caliber of talent that can use lisp. That may be a good thing (it was in the case above for sure). I suppose it really comes down to making sure that the complexity of the application warrants the use of the more advanced abstraction. A simple web-site for someone selling tractors might warrant a different ("easier") tool than something inherently more complex.
- arnoooooo 16y agoThis reminds me of PG's essay on Java, in which he wrote "Java's designers were consciously designing a product for people not as smart as them.". Ben says that smart people should also work with these languages because non-smart people might have to work with the code. I think that is actually what happens a lot in the industry. Smart people who know Lisp, Ruby, Python, etc. still end up coding in Java because that's the language everybody else knows. What I don't like about this is that it's basically saying that people can't become good at programming. It's accepting that the majority of professional developpers can't learn to use languages like Lisp correctly or to understand a Lisp program that uses powerful abstractions. Maybe the ones who really can't are not in the right business ?
- forinti 16y agoI agree with PG and I also think that Java and C# maintainers are wrong to keep adding features to these languages. I've done a lot of work with Java (and some with C#) and most developers have a hard time even with original Java's scope rules. So, if these languages want to be the COBOL of the future, they should keep it simple and dumb. Closures and Generics aren't for most people. Or they could add some compiler directive for switching on advanced features.
- IDisposableHero 16y agoI take the point about "Java's designers were consciously designing a product for people not as smart as them." But, consider the reverse - The C++ spec always seemed to as if the language designers were showing off - competing to add fatures that showed off how clever they were, without as much regard for the readability and maintainablity of the resulting code in the language. I don't think that strategy is optimal either. Also, if you think only simple code can be done in C#, have a look at the Rx framework. C# as a language is suffering from a bit of bloat too, but not as bad as C++.
- dan00 16y agoI think the problem of Lisp is, that it's very powerful and very dynamic. As long you're working alone, that's not that much of an issue, but with more developers you need to add more security nets, without the aid of a powerful type system. Most people love dynamic typing, because they hate the static typing of languages like C++ or Java. Powerful languages also need a powerful type system, that the developer can fully express his intentions, with the aid of a compiler validating them. Mainstream languages should start looking at type systems of languages like Haskell.
- nocipher 16y agoThe more fundamental reason, I believe, is that it is often hard to just hack something together in Lisp. This mostly due to the library issues and a lack of users creating good documentation and guides. For example, a few weeks ago I wanted to start writing a program that analyzed some spreadsheet files, spit back out some relevant information (including graphs), and then served this information up on some specified port. I initially wanted to write this program in Lisp so I began to look at available libraries. For the gui component, my first pick was Qt, for which Lisp actually has bindings. I spent about a week trying to get all the dependencies for it installed unsuccessfully. The documentation essentially says, "You need all these installed," and then gives you a bunch of links to their respective websites. All of the other details were missing. Specifically, I could not install the smoke bindings for Qt. I searched for any guides or documentation and always found a git/svn repository. Once I had the files, I had no idea what to do with them; where they needed to go or how to compile them, etc. Raw .cpp and .h files that have dependencies do nothing in isolation. Furthermore, there was no support forum or any other place to ask for help. Finally, I just gave up. It was too much work to just hack together what was supposed to be a fun weekend project. So I moved onto Python, which just worked. I'm sure I'm not the only one who has had such frustration.
- gnosis 16y agoDid you try using Quicklisp? Also, I would recommend that when you have problems like these you come ask about them on #lisp and #quicklisp on freenode. There are many very helpful and knowledgeable people there. Often, they're the authors and maintainers of the very tools you're trying to use.
- fleitz 16y agoA better question is whose going to maintain all those for-loops that are buggy because human error means even a basic thing like a loop will get screwed up. Managers are always talking about code reuse but as soon as you pass a function, they are like "Woah thats crazy how can we maintain that" Only managers would think that int accum; for(int i = 0; i < arr.length; i++){ accum += arr[i]; } is more readable and maintainable than... arr.sum(x => x) Oh look and even though I've written a million for loops depending on the language there is a bug because i didn't intialize accum.
- fauigerzigerk 16y agoAre you explaining the difference between code you have to write and debug and code that someone else has already written and debugged?
- fleitz 16y agoWhat I'm saying is that passing functions (or functional programming) allows you to reuse a lot more code than typical imperative programs with a lot less effort. I personally find the functional style to be much more readable and don't understand why everyone has such a problem with the maintainability of code written in a functional style even if it's a mostly imperative language.
- DougBTX 16y agoI'm not sure where managers come into the discussion, but the second example is good, but even better like this: arr.sum()
- apl 16y ago> They follow where We the Blessed Gurus lead them. But > this time it is to the slaughterhouse, because the > world needs only fifty Lisp programmers to write All > the Code. Oh comp.lang.lisp. Why did I even bother to read the replies?
- hessenwolf 16y agoSomebody uses the following line in the thread: "not because they are good programmers, but rather because they are good communicators". Hell yeah. Overly-abstract code can be like using variable names x1 to x267 because it is more efficient to type. Time I spend grokking your code is time our website spends offline.