10 ms·
Wow.. This "Strong interest list" is awesome: * Tuples (Proposal: #347) * Pattern matching (Proposal: #206) * Records / algebraic data types (Proposal: #206)
by cies 12y ago
Wow.. This "Strong interest list" is awesome:
* Tuples (Proposal: #347)
* Pattern matching (Proposal: #206)
* Records / algebraic data types (Proposal: #206)
* Nullability tracking (Proposal: #227)
* Async streams and disposal (Proposals: #114, #261)
They seem to be really useful for a "more-functional style" of programming.
When comparing these ambitions and the level of transparency to Java's ambitions & transparency, then it seems that C# is (or has) overtaking Java. Combine that to the fact that dotnet is now an opensource project, and MS seems to be more "open" nowadays then Oracle has ever been: I'm stoked about this news.
- MichaelGG 12y agoIt's "awesome" ... yet still many years on behind. These are the kinds of things that should have been in v1 or v2. Things that F# got right from the get-go. It's great if you have to work on projects that are stuck with C# (but can freely use the latest compiler).
- cies 12y agoGiven how much MS has invested in Haskell, and how little/late they use that technology to their advantage has made me wonder many times what drives their R&D budget. Non the less: cool "new" features in C#, and thank you very much MS for investing so generously in Haskell!
- rasur 12y agoDo remember, they also have F# which is very much a functional language (in the style of SML or Ocaml)
- tome 12y agoDo they invest that much in Haskell? SPJ's salary, and previously Simon Marlowe's salary. That's nothing compared to what they actually put money into.
- cwyers 12y agoIt's a very large investment from the perspective of Haskell, a miniscule investment from the perspective of Microsoft.
- tome 12y agoCouldn't have put it better myself! Thank you for understanding my point.
- cies 12y agoLet's be humble and call it a big investment. :)
- thinkpad20 12y agoThey still have arguably done more for the language than any other major corporation. Saying "they could have done more" seems a little petty.
- tome 12y agoArguably? Almost certainly. That, however, was not my point ...
- tome 12y agoLet me clarify. I wasn't responding to cies's second line (Microsoft has contributed a lot to the Haskell community for which we are very grateful) but the first. It would be a mistake to think that from Microsoft's perspective they feel they have spent enough money to even begin to think about extracting some sort of reciprocal benefit from that. Admittedly my comment was ambiguous.
- MichaelGG 12y agoWell remember that the F# team had generics before C#, and they are the only reason the CLR shipped with real generics in v2. So that's a pretty big return, seeing as real generics was a flagship feature difference between the CLR and JVM.
- M8 12y agoDon't forget that F# was mostly "forked" from OCAML, while C# was mostly "forked" from Java. So yes, F# got some OCAML features, but it got the weird ML syntax as well.
- pjmlp 12y agoIt has nothing of weird.
- dtech 12y agoNot only syntax, a lot of the restrictions feel weird for a Java/C#/Scala programmer as well. E.g. functions needing to be declared before you can use them feels like you are coding in C again. F# probably is a better functional-with-OO-aspects language, but C#/Scala are clearly better OO-with-functional-aspects languages and programmers currently want the latter.
- chadzawistowski 12y agoI'd argue that restriction of F#'s is actually a feature. Cyclic dependencies are a real beast to reason about, and I like that F#'s lexical scoping means I need to opt-in to mutually recursive functions with `let rec`. You're probably right that it feels unfamiliar to Java/C#/Scala programmers, but I enjoy the sense of security that F# and other restricting languages provide.
- stonemetal 12y agoIt started with "weird ML syntax" but they developed a new syntax and migrated to it. It hasn't used the original syntax for a while now.
- bernadus_edwin 12y agoIt is kinda little irony. C# become more like sun in 90s and java become more like microsoft in 90s
- saiya-jin 12y agoJava's strength is not the power of the language, and nobody ever claimed so. They improve it bit by bit, but that's all. You want to use uber-cool features? Try Scala or any of the gazillions other languages/platforms JVM fully supports. (personal anecdote - as senior java guy with 10+ years of experience, I've got recently assigned a small project of amending legacy MFC C++ (but mostly C) app - I could write a book about the pain. Language itself is a minor obstacle in this effort (albeit MFC/WinAPI has very steep learning curve for me). Where Java wins, and will win for many years to come is maturity of toolset, quality of open source libraries and also probably the most important thing - the amount of skilled developers any employer can pick from. .NET platform will probably get (finally) on track, but it's an uphill battle against Oracle's current position. But I like the situation - improvement in MS camp will force competition to improve as well, so we all benefit :)
- WDCDev 12y agoI always felt Java's strength was the runtime. Java can run on so many platforms. Compare that to how many CLR implementations there are. This is one of .NET's biggest failings, though this is being rectified by MS when the open sourced the runtime.
- bontoJR 12y agoYou're right and being 20 and more years old, it has so many optimizations that are making the JVM damn fast. Scala takes advantage on many of these optimizations and results are impressive. I think Java as language is failing in the implementation of new concepts, being quite late compared to other languages not running on the JVM. If C# will improve the general performance and stability of CLR, already having the best IDE ever made, they can easily compete and even win against the Java-World. P.S. I worked with Java (now only Scala) and C#, so I have experience with both languages/envs.
- frik 12y agoMS open sourced only a certain parts of dotNet. Important legacy parts like WinForms are closed source.
- thescrewdriver 12y agoThat's a very useful set of features, glad to see more of the features I'm used to in Scala (although obviously not the first to have those features) showing up in C#. It's still a bit of a stretch to say that C# has "overtaken" Java in general, or to read too much into Microsoft's moves (they haven't open sourced any of their main profit-generating software (SQLServer, Windows etc.), just enough to earn a bit of street cred. amongst developers). In terms of features C# is far ahead of Java, but many Java developers simply don't care as C# is far from being widely established and broadly used outside of Windows. Even on the JVM many Java developers will use Java the language as it's the standard, rather than because it is a fantastic language. Those who do care have moved on to Scala, Clojure etc. We've relegated Java (the language) largely to legacy status, but rely heavily on the Java ecosystem (JVM, IntellJ, java libs etc.).
- blumkvist 12y agoMiddleware is the most important strength of Java.
- deleted 12y ago[deleted]
- halosghost 12y agoI am incredibly psyched for Tuples, Pattern matching, Algebraic data types and Nullability Tracking (four of the most-likely list)! I mean, to be fair, these are all things that Haskell offers me, but more languages getting these can't hurt! Good steps forward! Now, all I have to hope for is that the nix support for .NET becomes more robust so I can actually code in C# on platforms that I care about supporting ^_^ (Note: this is not meant as a slight towards Windows, I just prefer working with / coding for nix).
- platz 12y agoRegarding Pattern Matching and Algebraic data types, I am not sure that they are implementing both of these ideas to the fullest extent that you would find when we typically refer to these items in existing functional languages. For example, Pattern Matching. From my glance it appears a nice way to assign bindings from an expression, but I didn't see anything about guards. Also, any kind of pattern matching without the ability to check for exhaustiveness defeats the safety they provide usually comparable with inheritance. Which comes to Algebraic data types. All I know is there are several boxes you must tick to really call it "Algebraic data types". I am not sure all those boxes are "ticked" here. This question came up when swift introduced "Algebraic data types", but no-one could get recursive ADT's to compile. it does look like this proposal allows recursion, but there are other things i'm sure are at play such as how it works with generics.
- halosghost 12y agoAhh, that's too bad to hear. I read a little bit of each proposal, but was drawn back to work once a build completed and did not have a chance to exhaustively explore each one. Well, I hope that they manage to fill out each feature a little more. Fingers crossed!
- platz 12y agoreading a bit more, they did mention in the "optimizations" section "Closed hierarchies enable the compiler to detect when a set of matches are complete". I really hope they don't leave this to an optimization, and make it a core part of the feature!
- reactor 12y agoI've been using Java for almost 6 years mainly with IntelliJ and I've heard many times that C# is better than Java. Recently I've got chance to work with C# (on Visual Studio 2012 with Resharper). Oh boy, I don't know how to express my feeling, but in one sentence "It's just suck to the core". I completely agree, as a language C# is more rounded, but as far as the ecosystem and tooling concerned its literally nowhere near to Java.
- rjbwork 12y agoThat's funny to me because my experience was the exact opposite. After an undergrad experience of Java, C, C++, Python (at least from the OO/C-likes) on *nix systems, trying C# 5 w/ VS2010 + ReSharper was some kind of transcendent experience. I LOVE the language and I've found the entire ecosystem fine. There are some corner cases for some more advanced systems level stuff, but I've yet to be unable to do something I needed to. Java feels like a clunky dinosaur to me now. But hey, different strokes for different folks.
- ChristianGeek 12y agoI have a similar background and my experience was the same.
- manzanapera 12y agoI'm disappointed by your comment because you didn't provide any details on how "It just suck to the core". Guess you only wanted to trash-talk C#?
- reactor 12y agoMay be its just me. But since you asked: 1. On the same machine, I find VS 2012 was dragging (but memory was always hovering around 400MB) 2. Couldn't stand for .csproj style solution files (may be I'm spoiled by pom.xml, but its way better) 3. We as a team working on the same project and merging those .csproj files are literally pain in the ass. 4. The windows layout in the IDE is quite un-intuitive. You should see how IntelliJ manages all those windows. 5. The disconnected namespace and folder structure is another pain. 6. Related to the point 5, looking the source code and namespace imports, I can't see from which file those Classes are being "imported". 7. Maintaining and adding references is PITA compared to Java projects that uses maven. Again, as I clearly mentioned, C# as language is better, but the tooling and ecosystem are not. Its not always about the better language, Software is mostly written once, but read, refactored, maintained thousands of times by dozens of people. So the tooling and ecosystem has its place, so as the backward compatibility.
- PopsiclePete 12y agoJava the language may suck, but the JVM rules. Microsoft's idiotic stance to make C# and the CLR windows only for the last 15 years basically made it largely irrelevant outside of pur MS shops. I program C# for a day job and it doesn't matter how awesome the language is, because the entire eco-system until recently was hampered by being MS-only. We are slooooooooooooooooooowly seeing the ship turn around with NuGet, and many MS-build libs appearing on Github and the CLR and compiler going cross-platform but it's 15 years too fucking late to matter. Java and the JVM won.
- nightski 12y agoHaha, no. In fact there is plenty of room for both. On the bright side you can go to just about any city in the country and find a job in either Java or C#/.NET development. Both are very widely used.
- PopsiclePete 12y agoInteresting. My experience is that Java jobs outnumber C# by almost 3:1. Not only that, but the type of job is also vastly different. C# seems to be used in (mostly) slow-paced, slow-moving, conservative environments based fully on an MS stack top-to-bottom. Java jobs seem to be all of those above, plus a lot of start-ups and places like Amazon/Google. Not many C# jobs at Amazon/Google besides some public facing client API; there's no MS tech in their actual back-ends, that I'm sure of. And C# could have absolutely destroyed Java. It was already better when it was introduced and the Java eco-system hadn't acquired enough steam. But MS "wisely" decided to keep it Windows-only as if somehow C# was so awesome that it would make companies switch from Linux server farms and back-ends to Windows servers just to be able to experience the joy and glory that is C#. Nope.
- nightski 12y agoHonestly I don't think the goal of .NET was ever to convince companies to switch platforms or to compete with Java (replace it on the MS platform yes, but not dominate it as you seem so obsessed with). It was to provide a compelling development story on their platform for not just server side development but also client side (where Java completely fails). It may be very true that Java jobs outnumber C#. It doesn't change the fact that it is pretty easy to get a job in either, and both lead to generally very boring jobs. I currently service .NET clients in the above $100/hr range and have had no trouble finding work from a rather remote city also (it's no Seattle or Silicon Valley, that is for sure). But I don't understand your obsession with "destruction" and "domination". There is plenty of room in this world for lots of technologies and they don't have to all be focused on destroying/replacing each other.
- mhomde 12y agoI don't know, dont' get me wrong these are all nice features but it's nothing that I think will drastically change or improve the way I code (like for instance LINQ or generics did). With the possible exception of null tracking (no pun intended). Making testing and eliminating bugs easier is the one area that really could benefit from a grand new concept or methodology. I was really hoping for better integration of tests and pre/post conditions
- pistle 12y agoThere are only so many LINQ's in the history of programming or any programming language. It is unlikely that anything added to the language, at this point, would have such an impact. On testing and pre/post, this is an area around which I am quite sympathetic. However, I'm ambivalent about the unintended consequences of fleshing it out too far. It seems that by encouraging testable code, I get much of the relief to my pain. That said, it's a cat and mouse game for things like async-await features... followed by support for testing said language feature.
- mhomde 12y agoYou sound like an US patent clerk in the 1901's ;) Look at Rx for example, it isn't needed in as many applications but when it is its as revolutionary as LINQ was. I think reducing friction and increasing productivity is really important, it's not as sexy as some of these other features but it makes real difference in big projects. I'm getting a little worried about the async-await and task methodology. It's true that they've made a lot of that kind of programming much much easier, but it also means that orchestration is cluttering our code. It seems that now that we've elevated the level of abstraction it should be possible to get rid of it (more or less) by being more declarative in our intent and structures. We're programming on at least one layer below what we should. Unfortunately I think that might require so large fundamental changes that you need a new language. Many might say, what about F#? While F# is great for certain more algorithm oriented solutions for me it never seemed to quite fit the paradigm of certain applications and enterprise systems. I think in the end there's a skeleton of a next generation language embedded in what c# has become. If we removed some of the crud and used LINQ style syntax as template perhaps we could take parallelism, asynchronicity and productivity to the next level
- the8472 12y ago> the level of transparency to Java's ambitions They are fairly transparent if you ask me. Here are a few examples[1][2], there are more to be found on the openjdk page Additionally, scala already has some of the features proposed for the inclusion in C# in the future. [1] http://openjdk.java.net/jeps/0 http://openjdk.java.net/jeps/0 [2] http://openjdk.java.net/projects/panama/ http://openjdk.java.net/projects/panama/
- saosebastiao 12y agoThis is pretty amazing...its almost as if the Roslyn devs are all fans of F#. Even though I'll probably still end up using F# the majority of the time, better interop with C# sounds like a really good deal.
- MichaelGG 12y agoOr they're just converging on decent designs over time. Just like fixing their lack of optional parameters (although the implementation is still a broken compile-into-callsite C-style method). Just like adding more support for mutability. Null references were a mistake, and now, after countless thousands of lost hours due to them, they're starting to patch it up. But it's probably heavily inspired by people on the same platform getting radically better feature support by a much smaller team. Or as Don Syme said (I think it was him or perhaps SPJ), features get done in Haskell, trickle into F#, then into C#. Even generics was in F# before C#. And the current proposal on records does not appear to be compatible with F#. I'd give a somewhat higher probability to the F# compiler changing to deal with C# than vice versa.
- emmanueloga_ 12y agoI think people mentioned this already, but the first four bullet points make it look like there's a strong interest in getting C# closer to ML :-). Nice!