8 ms·
C# 4.0: The industrial response to Lisp?
- Aaronontheweb 16y ago"I'm assuming, based on long observation, that Microsoft with high likelihood fucked up the pragmatics completely, and that programming in C#, as opposed to reading about it, is deeply depressing." I've not found that to be true - C# is a lot of fun to work with.
- ldite 16y agoLikewise, although I've never been too sure how much of that comes from VS's auto-magic everything and refactoring tools.
- pixelbath 16y agoThe author completely invalidates this statement with the previous, "Now, I must say that I haven't ever used C#, so I don't know how it stacks up ITRW."
- shasta 16y agoHow is "Based on previous experience with MS products, <prediction about C#>" invalidated by not having used C#?
- sjs 16y agoIt's like someone talking about Mac OS X based solely on their experience with classic Mac OS. They are entirely different products created by different people, that happen to work (or have worked) at the same huge company.
- shasta 16y agoYou're arguing that company track record is not a good predictor of product quality. Fine. Nonetheless, product predictions based on company track record are not "invalidated" by not having used the product, and the author made it clear what he was basing his predictions on.
- sjs 16y agoNo, I'm arguing that track record is not always a good predictor of product quality. Very different statements.
- euroclydon 16y agoI program in Ruby, JS, Python, and C#. I love the dynamic and functional aspects of JS and Python. Once you get up and rolling with a C# project, using all the new v3.5 and v4.0 features is very pleasurable, but the facts that it's a compiled language, all but requires Visual Studio to be effective, and that getting a project up and running can be such a pain, all create a barrier to entry and to simply playing around with it. On the other hand, you do have the dynamic .NET languages like IronRuby and IronPython to play with, but you write code totally different in them than you do in C#, so it's really an either/or situation, which doesn't help.
- kenjackson 16y agoWhy is getting a project up and a running a pain? I can get a simple project up and running (a simple dialog with four buttons that moves a ball in the window) in about five minutes. That's from a no VS, to starting VS, creating the solution, writing the code, compiling, and running the app. How long should it take? And note, most of the time is spent writing the code (~4 minutes).
- euroclydon 16y agoIt just feels wrong when a dynamic language doesn't come with a dynamic interpreter.
- troygoode 16y agoC# isn't a dynamic language - it is totally static. The introduction of the "dynamic" keyword in 4.0 has confused some people into thinking it is truly a dynamic language, but in actuality that keyword is just a compiler hint that causes any references to that "dynamic" variable to use run-time reflection.
- mquander 16y agoSpeaking for myself, it's not getting a "project" up and running that's a pain, it's getting a single line of code up and running. I don't like to have to make a project (or even a Main method) to do that; I would prefer a REPL. When working on a big project, if I want to just test out a piece of code, I actually find myself launching the project, pausing it, and using the "Immediate" window in Visual Studio as a REPL, even though it's inconvenient for the purpose.
- j_baker 16y agoC# would be awesome except that it is a very "IDE intensive" language. Don't get me wrong, Visual Studio is a very good IDE (and MonoDevelop is shaping up nicely), but I'd still prefer vim or emacs as opposed to needing a fancy IDE to be very productive.
- deleted 16y ago[deleted]
- sbt 16y agoI use Emacs/Eclipse in my job because I work with Erlang/Java, but previously held several C#/VS positions. I sometimes get the feeling that people who haven't worked with this combo don't realize how powerful it is. Visual Studio is great as an IDE for C/C++, but C#/VS just becomes an extremely productive experience, quite unlike Java/Eclipse (though the latter is getting somewhat better).
- hga 16y agoBack when I was using VC++/VS pre .NET for C/C++ I did all my editing in EMACS. Messy when I changed the line numbering out from under debugger breakpoints but it otherwise worked very well. How practical would that be nowadays?
- olavk 16y agoC# is designed with IDE support in mind. For example, in Linq the "map" syntax is: from a in b select a.x This syntax is actually backwards compared to both SQL and list comprehension syntax is most languages, which have the selector expression is before the input list. E.g in SQL: select b.x from b Or list comprehensions (in eg. Python): [a.x for a in b] So why did MS change the syntax like this? Most developers already knows SQL syntax, and Linq queries are supposed to be able to map directly to SQL. The reason it that it is not possible to provide code completion in the selector expression if the type of the list is not yet known. Hence in C# the list is written before the selector expression, so the editor helpfully can list all a's members when typing `select a.` Another example is "Partial Classes" which is a curious language feature which makes it more smooth to work with UI-designer generated files, but which I don't think has any useful function outside of an IDE. I don't think many other languages are designed with IDE support in mind in such a way. This makes it possible to provide a very smooth IDE experience.
- felideon 16y ago_You_ may think it's fun to work with, and I guess it depends on what you think is fun (programming in Chef sounds fun, but is it pragmatic for what you're doing?). And here's my comment to another comment on the blog post: The question is not whether you've used C# extensively and think it is pragmatic, but whether you have used anything better (e.g. Common Lisp) and _still_ think it's as pragmatic you once thought it was. If you say that C# is more pragmatic than, say, using COBOL for an web application, then sure. But the author of this post is correct insofar as new C# features sound a lot better on paper than how they really stack up when wanting to express yourself in code. Not to even mention that if you go outside of the OOP/procedural paradigm in C# and start coding using functional-style language constructs, C# gets pretty ugly pretty fast.
- kristiandupont 16y agoIn what sense is Common Lisp "better" than C#? Do you consider it better for web apps?
- felideon 16y agoI could put in my own, wannabe lisper words, but I think pg explains it well: http://www.paulgraham.com/avg.html http://www.paulgraham.com/avg.html And yes, I actually wish I had more time to spend learning Lisp and using it for web development as well. See my blog (http://ifelipe.net http://ifelipe.net) for what it's worth---though it's on a bit of a hiatus.
- michaelcampbell 16y agoI speak only for myself here of course, but what I find so "icky" about C# is not the language, but the development environment. I haven't used the latest VS so it might be better, but even 2007 still felt years behind the popular java IDE's, and there didn't seem to be any real competition to it either. (Someone please correct my missteps here; I'd love to know more about it than I obviously do now.)
- phsr 16y agoI've used VS2005 and VS2008 extensively, and always enjoyed working with them, especially VS2008. I haven't used VS2010 much (read: at all) but am looking forward to using it.
- kenjackson 16y agoVS2010 is IMO a far superior IDE to VS2008. Especially if you're doing WPF or Silverlight. The browser, project system, and designer is just way faster. Which is pretty surprising because the Beta for VS2010 was horribly slow. My main ask is to get Xaml in better shape. I know that the dynamic language crowd will love Xaml, because 99% of all errors are runtime exceptions, but that's just a freaking drag on my productivity - especially since I think they can do static analysis to statically find probably 75% of the issues at compile time.
- bretthoerner 16y agoThat's odd, I've never used an IDE of any kind* but all I hear from friends that have used C#/.NET is how great Visual Studio is. * (well, Emacs counts, but not to people who normally use the word IDE in my experience)
- bfung 16y agoThe problem is that the overwhelming majority of C#/.NET developers ONLY have used Visual Studio. Monodevelop is not quite up to par, so really, for C#, there's only one choice for an IDE outside of notepad... I used to do more java development, but now do more C#, and I miss the the polish of Eclipse over VS (Incremental Java compiler is a huge win, Refactoring (resharper freeze my machine), Search indexes, Auto completion is still better, code navigation via back button, much better Source control integrations...)
- francoisdevlin 16y agoThe industrial response to Lisp can be found here, and it's thriving: clojure.org
- mahmud 16y agoSo the industrial response to Lisp is a Lisp? You'll need a bit more care when recurring over circular lists ;-)
- francoisdevlin 16y agoNo, that's a feature :-p
- cageface 16y agoMicrosoft has half of the best CS minds in Europe working for their research division. Some of that genius is bound to leak into their products eventually.
- mahmud 16y agoI would be more interested in the bright minds that had the wisdom to find work outside Microsoft. Nothing against MS, but if half of your peers are going to the same blackhole, and you choose not to follow suit, you're either a smart fella with better options, or you're not good enough. Assuming a 50-50 distribution; I am interested in that 25% that's both good enough, and chose to break rank. Because I have a good intuition that consensus always breeds mediocrity, never something exceptional.
- cageface 16y agoI have been surprised at how little of the genuinely innovative things people are doing in Microsoft Research seem to make it into their products, but there are a lot of very interesting projects going on in their research groups nonetheless. I can also understand the appeal of MS research. Academic CS presents a lot of distractions - the constant scrabble for funding, teaching responsibilities, campus politics etc. There are plenty of high-caliber brains in MS research. I don't think Simon Peyton-Jones, for instance, would have any trouble finding a post in any CS department.
- jackfoxy 16y agoI'm disappointed there is no "Express" release of the latest F#. There are a couple of different hack approaches, but a .NET 4.0 F# Express would sure be nice to play with. Apparently MS has no plans for this.
- mahmud 16y agoSPJ is at Microsoft, and so are Jim Larus and Leslie Lamport. But you know what? For a behemoth that allegedly swallowed half of the computing minds in Europe, and god knows how many in the U.S., it's very sad that I can name only three top researchers, and I have absolutely no idea what they're working on. I see more development coming out of the Factor camp, and Factor is pretty much a 25 year old guy in a basement. Lest you think I am picking on Microsoft, I haven't been too happy with the Google language R&D labs as well. They took out billions in cash and replicated Bell Labs, circa 1986.
- Silhouette 16y agoMy main concern about C# is that with each release, it becomes bigger and seems to be more of a kitchen sink language. This phenomenon has been the downfall of other popular industrial languages, notably C++. As the language grows, so does the number of interactions between features. All the little corner cases start to get in the way of writing clean, useful code. As the language grows, it also becomes harder for new programmers to learn it effectively, by which I mean not just knowing the syntax, but also understanding the idioms and being familiar with the libraries to make good use of the language in practice. For real world projects that make use of the advanced features, it therefore becomes harder to find staff who are sufficiently clued up in the areas that are in common use on any given project. The more programming I've learned, the more I am convinced that effective programming languages are simple. This doesn't mean they can't also be powerful, but the programming model is clear and the interaction between different features is either systematic or non-existent. Nearly every widely successful industrial language achieved its success initially when it was a simple language. Many industrial failures -- in the sense that they continue to be used more because of various kinds of momentum than because of their technical merit as programming tools -- became so when they stopped being simple.
- moron4hire 16y agoWhere C# differs from C++ in this case is that the standard actively seeks out such corner cases and defines them explicitly, whereas the C++ standard often leaves such corner cases in the "undefined behavior" realm. There is very little "undefined behavior" punting in C#.
- Silhouette 16y agoI'm not sure how significant that difference will be in practice. It's easy to bash C++ for "undefined behaviour" or "implementation-defined behaviour", and to a certain extent it's fair criticism. However, a lot of the interactions are defined. Unfortunately, they're defined in chapters of the C++ standard containing dozens of pages of dense language lawyerese. Even experts then get them wrong on a fairly frequent basis, and while the underlying idea behind some of the rules makes sense if you think it through deeply, the rules can still be counter-intuitive to a typical programmer who isn't a standards geek. In other words, it doesn't much matter if the corner cases are defined explicitly, unless you can define them in such a way that they don't catch practising developers out. I have yet to see any large, complicated programming language succeed in doing this.
- DrJokepu 16y ago> With LINQ's expression trees, they seem to tackle the same problem as Lisp does with S-expressions. The problem is that at the moment, it's a lot harder to work with Linq expression trees than with S-Expressions. If you're not very, very, very careful, expression trees can very quickly become an unmaintainable, terrible mess and it is very hard to debug them - it's a lot more painful than in Lisp. This might change in the future though with better tools.
- jcromartie 16y agoThe problem is that the people who appreciate the functional features of C# are the same ones that are already exploring other languages and paradigms outside of Java-flavored OOP. The flip side of this is that there are a lot of code monkeys in cubicles working on C# codebases who have no interest or ability to learn the exciting features. That leaves the people who are excited about these features in the tough position of either writing the best code they can and alienating their coworkers, or finding another job.
- ihodes 16y agoI think Clojure is the right response to Lisp: embrace it, and make it practical and quick.
- hga 16y agoAlthough there are those who say "Clojure is a terrifying meld of a beloved character and an unreasoning alien onslaught." based on: http://vintage-digital.com/hefner/misc/lisp-programmers.jpg http://vintage-digital.com/hefner/misc/lisp-programmers.jpg Me, I'll probably need to use Clojure on top of the JVM someday but I'd like to get a "Turtle Clojure" developed after Clojure-in-Conjure gets somewhere ("it's turtles all the way down"). But that's because I'm not too concerned with doing anything particularly or at least immediately practical right now.
- sofuture 16y agoThe biggest problem with C# is the .Net ecosystem. Without (much) an open source community, it is and remains a tiny pond, full of crap, including a million shitty web applications and all the .Net baggage (Visual Basic anyone?) Which is a damned shame. It is a beautiful and fun language.
- daeken 16y agoThere's a ton of open source code out there, from Mono, Gnome, a lot of projects on Codeplex, and a bunch of other sources. I don't know where the myth that there's a lack of open source .NET code came from; it's simply not true.
- WalterGR 16y agoall the .Net baggage (Visual Basic anyone?) I don't understand this. What ".net baggage"? .net is a (huge) class framework that has evolved along with C#. How is Visual Basic relevant to C#? Are you talking about VB classic? VB.net is just another language that compiles to the same IL as C#.
- tomjen3 16y agoThats true, but it isn't so much the baggage, as it is that you can't distribute a program written in C# unless your users have the .Net runtime installed, which is a pretty fucking big download. It is 2010, and it still doesn't have a linker (this wouldn't have mattered so much if the programs where still distributed on a CD, but it sucks when you have to download that much).
- grandalf 16y agoDoes anyone know if there is a way that Arrays can be passed by ref in c#?