124 points · by pauloortins · 13y ago · 302 comments
When I meet other devs and tell them I work in lots of languages and platforms but prefer c# they usually look at me like I have 3 heads.
I like to show them LINQ and Async as some things I really like about C#, then I get into how rich the BCL itself is.
Devs are also pretty shocked when I tell them I can write truly 100% native iOS and Android apps in C# (thank you Xamarin) and that one of the most popular mobile game engines (Unity) uses C# and a version of the .NET Framework under the hood.
As an aside... whilst C# takes a lot of the public .NET praise, F# is the real hero in the making. When I show F# to some hipsters they get very unsettled very quickly as suddenly they realise all that shitty Ruby and JavaScript they've been writing for years is probably not going to be anywhere near as employable in another 10 years, maybe, hopefully.
Interesting times indeed. And yes, Xamarin is awesome and Microsoft seriously needs to bring that great firm under their wing. Writing your mobile apps per platform is a major violation of DRY principles and is utterly ridiculous.
Since .NET isn't open-source, it doesn't come with the same guarantees as something like Java, C++, OCaml, Haskell, etc... Microsoft could discontinue it, make the terms of use more restrictive, etc...
Further, .NET applications only run (officially) on MS platforms, Mono isn't the same, and due to legalities many people are hesitant to base their business on Mono.
As far as hipsters and Javascript or Ruby, MS has fully embraced Javascript. It's a first class language on VS, Windows 8 'modern' interface, etc... Ruby is great within its domain, and even has a .NET implementation (though I don't know how well supported IronRuby is anymore).
And funny you praise F#, because it's just a MS implementation of OCaml, with a few small differences. Speaking of which, OCaml is pretty awesome, it compiles down to pretty much anything, and is fast as hell...
The foremost difference is the ability to easily and closely interoperate with existing .NET code; this sounds very simple, but it's very tricky to get it right, and in fact this is widely considered to be a major strength of F#.
F# also has computation expressions (like monads in Haskell), sequence/list/array comprehensions, type providers (for strongly-typed data access), and built-in async support. Not to mention, since F# runs on the CLR, it has a well-tuned, high-quality, multicore garbage collector at it's disposal.
I know some of the folks from OCaml Labs, and I have nothing against OCaml. I just want to dispel the notion that there are no differences between OCaml and F#.
The actual runtime is an ECMA spec (which has been unchanged since v2, as all MS has added since are implementation changes and more libraries). C# and the core parts of the runtime are under Microsoft's Community promise[1]. But you're right that MS could try to assert copyright over parts of the extended APIs, and some companies might be worried about that. OTOH the Oracle versus Google thing should alleviate a lot of concerns.
As far as F#, it's quite a bit more than a few small changes.
1: Writeup by Xamarin here: http://tirania.org/blog/archive/2009/Jul-06.html
One of the most powerful features I've found is part of the LINQ framework - the expression tree output. You can specify parts of code to be 'half-compiled', it leaves an AST fragment in the output in addition to the regular code.
This means you can do runtime transformations, for example to JavaScript or HTML.
The pattern matching extensions also make these transformations easier than you'd expect.
A few years ago I tried to introduce OCaml to a company I was working at, an Oracle shop, and immediately hit a snag - the Oracle bindings hadn't been maintained in years and wouldn't compile with the current GCC or OCCI. ISTR there were also 32/64 bit issues. Anyway, I actually went ahead and wrote my own, styled to look a bit more like the classic OraTcl to make adoption easier. I say this not to blow my own trumpet but to illustrate that there is more to a language then the language. And not to knock the OCaml guys, just that their research priorities are different than my corporate data processing priorities.
Anyway, the OCaml world is playing much more nicely with others now, the book Real World OCaml is almost out, OCamlPro are doing some good work. But in F#, you can "hit the ground running".
> .NET applications only run (officially) on MS platforms,
Not only that - non-Microsoft platforms have a huge choice of languages, platforms, runtimes and other tools Windows can't match. With all that going on, it would be surprising if someone decided for .NET to run on non-Windows boxes.
The only reason to target .NET is to build Windows-compatible software. It's an important requirement, sure, but there is a lot more happening these days on spaces Windows simply can't reach.
I'm a Microsoft fanboy, but a thousand times no. So they can do what with it exactly, pull another Skype? Xamarin caters to areas MS rarely do and bringing them in would push people out of the windows ecosystem, not inward. MS's catering to ios and android is to push people to windows phones and that isn't likely to change anytime soon.
I'm definitely glad Xamarin exists, especially after Novell kicked them to the curb. They could've kept their ball too but they decided to play fair and let Mono live on. I would never in a million years think MS could be that generous, and again I love MS for better or worse. Could they be? Sure but in spite of Bill Gates charitable contributions to humanity, those notions rarely took root in the company that enabled him to become that person in the first place.
There's also the excellent F# for Fun and Profit website, which has lots of good F# tutorials: http://fsharpforfunandprofit.com/
As an active contributor to the F# open-source community, I can tell you that there is a lot of effort -- both from Microsoft and the wider community of developers -- to build out the F# ecosystem of tools and libraries. For example, Deedle (https://github.com/BlueMountainCapital/Deedle), a data frame library for F# and C# was released a few days ago; this gives you the kind of data-manipulation functionality as you'd get with Pandas or R. JetBrains even started an open-source project to bring F# support to ReSharper: https://github.com/jetbrains/fsharper
It's odd because Scala and F# are very similar in what they bring to the table.
Losing ReSharper is an arse yes. I've heard that F# vNext will have lots of VS improvements which may also cover some common refactorings.
Xamarin would provide the perfect solution to getting a major foothold on mobile app developers, which is what Microsoft so desperately needs for their Windows Phone aspirations. Once you have developer mindshare, you have cracked half the problem.
I don't look at .NET, not because it was created by Microsoft, but because I hate the ecosystem and because Mono kind of sucks on Linux.
Miguel de Icaza's response was to run the server under both Mono and .NET without actually connecting to it so that it was totally idle, and use the results to claim that in fact Mono was more memory efficient and the developers of OpenSim were just spreading FUD. I am sadly not joking: http://opensimulator.org/wiki/Mono
They mismarket F#, preferring to say it's for scientists and financial programmers. Instead of marketing it as what it is, a much more capable language all-around, unless you need certain GUI/tooling support.
These kinda things don't help .NET's reputation. If a non-MS affiliated company marketed a language as lean as F#, with as good a runtime and editor/debugger, they'd be a huge amount of "hipster" cred and praise.
// properties not declared anywhere; runtime property definitions
dynamic myObject = new JavaScriptStyleObject();
myObject.firstProperty = "hello";
myObject.secondProperty = 1;
C#5 added async/await, which I think is one of the most 'integrated' ways I've seen of doing async programming. Think node.js with a lot less syntactic cruft around the callback functions; in C#5 you could write, say; // evented I/O using the 'await' keyword;
var fileContent = await ReadFile(@"c:\foo.txt");
Console.WriteLine(fileContent);
rather than; fs.readFile('c:\\foo.txt', 'utf8', function (err,data) {
console.log(data);
});
This eliminates the need to write lambdas while retaining the evented I/O style.Both of these seem pretty significant.
The reason is that they're rewriting the C# compiler using, er, C#. It's as part of an initiative called "Roslyn" that aims to make the compiler a pluggable component with a public API for the compilation AST.
They did a blog post recently explaining that whilst this work is ongoing they are trying not to change the C# language too much to aid them with testing and verification. But that once Roslyn is released they will start a fresh wave of language enhancements for C#. I think we all have some ideas on what those will be to start off with... proper tuples support, and probably some form of pattern matching.
OCaml? Which is what F# is based on, compiles to anything (including fast native code), and is open-source?
It's nice that F# has better type inference, but I feel like it really isn't that different than C#. If C# got rid of boilerplate, made brackets optional, and fixed type inference, what does F# buy you?
I make the inverse argument: At a minimum, you can use F# as C# but with better syntax. So what does C# buy you, if you're not using some of the VS designers?
FYI, I highly recommend Stuart Lodge's MvvmCross for this: https://github.com/MvvmCross/MvvmCross
Xamarin's website has a bit more information: http://docs.xamarin.com/guides/cross-platform/fsharp/fsharp_...
Clojure has some awesome libraries, but unless you can show some use cases where futures/promises and core.async make it possible (or even just easier) to implement functionality compared to async/await (or F# async) I'm not inclined to take your word for it.
In Clojure CSP is implemented as a library (core.async), no changes to the compiler needed. Now that's power.
(disclosure, I helped write core.async)
Futures and promises aren't unique to Clojure. For example, AliceML had them ages ago.
After thinking it over, I'm going try implementing them for my ExtCore library for F# (https://github.com/jack-pappas/ExtCore). Thanks to the GP for the idea.
Think about it. Setup, Administration or Programming can't use any of the thousands of programs already written for the OS.
Most Microsoft-only developers don't get it. They usually say, "Oh, you should try Powershell". Powershell is, to put it mildly, 'utter crap'. They might have as well asked people to use a C# REPL with the .Net BCL.
Edit: I should explain a bit.
How do you zip a folder? via http://stackoverflow.com/questions/1153126/how-to-create-a-z...
function ZipFiles( $zipfilename, $sourcedir )
{
[Reflection.Assembly]::LoadWithPartialName( "System.IO.Compression.FileSystem" )
$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal
[System.IO.Compression.ZipFile]::CreateFromDirectory( $sourcedir, $zipfilename, $compressionLevel, $false )
}
-- or download an extension from CodePlex.
You see the problem?Let's take your example. The only reason it's shorter on Unix is that most Unix systems have programs called "zip" and "unzip". That's legitimate, but if we looked at e.g. modifying DNS, tweaking folder permissions, and a lot of other things, the PowerShell and bash/sh ways would be much closer. I'm not going to argue that PowerShell is a great language; I've been pretty public about hating it. But this isn't about whether Windows can be automated.
The real issue is that, for any given task, there's an easy way to do it in either the old COM-based WMI/WSH system, or in the PowerShell system, but not always both. Since we're on the topic of zipfiles anyway: the way I'd actually make a zipfile from a script would be to bust out the ol' "Scripting.FileSystemObject" COM object, which lets you pretend a zipfile is simply a folder, and which is merely a "$fso = New-Object -ComObject Script.FileSystemObject" away in PowerShell. One that bit us at work last week in a more real-world situation is that, while nearly all of Hyper-V is controlled via PowerShell, the network connection sharing settings are only available via COM interfaces, so allowing your Hyper-V machines to talk to the world still requires a trip back to the Windows 2000 administration handbook.
This stinks, and it needs to be fixed. I'll even grant that the situation might be worse than on many Unixes. But it's also totally automatable, and I'm not convinced that it's dramatically worse than other systems I've had to administer.
zip archive.zip folder
The equivalent Powershell code would look like this: 7zip a archive.zip folder
Pretty much exactly the same, since in both cases the shell isn't doing anything other than invoking a standalone executable. So this doesn't really tell us anything at all about the relative merits of Bash and Powershell. A better comparison would be this: how do you zip a folder in Python? Again via Stackoverflow (http://stackoverflow.com/questions/1855095/how-to-create-a-z...): import os
import zipfile
def zipdir(path, zip):
for root, dirs, files in os.walk(path):
for file in files:
zip.write(os.path.join(root, file))
if __name__ == '__main__':
zip = zipfile.ZipFile('Python.zip', 'w')
zipdir('tmp/', zip)
zip.close()
Compare that to your Powershell example, and I think you'll agree that the .NET API is nicer to use (heh, don't say that very often). But to return to the subject, how do you zip a folder in Bash? YOU CAN'T. Bash can't zip folders. It can't call libraries that can zip folders. It can only invoke programs that can zip folders. And any shell, even the wretched cmd.exe, can do that.I have plenty of problems with Powershell but it is by far the best effort at a shell that the world has yet seen. I come from a Linux background and when asked what I like about working on Windows, I reply with "well, it's got a nice shell." Usually gets me a weird stare, but if we're really comparing shells to shells (and not shells to a wide variety of standalone utilities) then Powershell blows everything else out of the water.
The only differences are nssm for windows services, and init.d for linux ... haven't had to setup any background/startup services on my mac yet, so not sure what it uses.
I don't get why people hate windows so much as a rule, I really like the Win7 UI (not a fan of 8, but can see how some would be)... Also, warming up to Unity (more than win8)
1) It takes a good 4 or 5 seconds to boot PowerShell. This is unacceptable, a terminal emulator should boot near instantaneously.
2) Cmdlets are really freaking hard to write or use. It's hard for users to enable them, it's hard for users to install them, and it's especially hard for programmers to create them. Unix shells are much easier for all parties involved.
2: The hard-to-enable is a result of Microsoft's pro-security standing. They got a bad rep for allowing scripts to run freely in the past, so they tried to lock it down.
As far as developing and using them, I dunno, it seems vastly better than bash. Sane quoting that helps avoid injection mistakes. Auto-complete built-in throughout the system. Actual types, instead of just passing strings everywhere. And they ship a nice little editor/debugger with it, if you'd like that kind of thing.
The ISE takes maybe second and a half.
1) What version are you running? We had a problem with earlier versions that didn't NGEN and had startup delays. With V2 we made it so you can write cmdlets in PowerShell itself which is pretty simple. With V3 we added auto-loading of Modules which allowed Xcopy deployments and simplified discovery. We just released V4 so you might want to give a more recent version a try.
2) What don't you like about the language? Is it just personal preference or are there things you can't do or are too hard to do?
Thanks!
Jeffrey Snover [MSFT] Distinguished Engineer and Lead Architect for Windows Server and System Center
This is not that different than Unix BUT because so much of Unix is done using ASCII text files, the coding is really manipulating text files which can be done easily by admins. Windows is an API-oriented OS (vs a document-oriented one) which means that the coding looks much more like programming than in Unix.
The solution is to have the cmdlets you need. We are making great progress on that front but the reality is that Unix has about a 30 year head start so it will take us a while. In V2 we had ~240 cmdlets and in V3 we had ~2,400 cmdlets. (Sadly, ZIP/UNZIP are not among them). We added more in V4 and are extending our focus (from IT pros) to devops with features like Desired State Configuration. That is very much of a minimal viable product but I think we got it basically right and there is a lot of energy around this.
I appreciate the criticisms and encourage you do continue making them and don't hold back - we really do read these and use them to make the product better. Politeness is optional but we would really appreciate specificity (like you provided here).
Please let us know other things that we should be adding, doing differently or stop doing.
Thanks!
Jeffrey Snover [MSFT] Distinguished Engineer and Lead Architect for Windows Server and System Center
Amen to that.
A lack of understanding of how to do something on a very different OS != you can't do it.
I very much dislike PowerShell personally but its incredibly capable in modern versions of windows. We use it with Chef to automate our server configuration/setup.
Not really. If you don't like windows, use Linux or OS X and Mono.
See, for instance, keithwarren's comments in this discussion: he hypes up Mono-based cross-platform support in what's currently the top comment on this submission[1], but when someone who's actually tried Mono replies and talks about the problems they've had with it, he makes it clear that they should shut up, forget about Mono and use Windows[2].
[1] https://news.ycombinator.com/item?id=6659798 [2] https://news.ycombinator.com/item?id=6660976
Since then I've had daemons running 24/7 doing telecom processing (either routing decisions or call record management), written in F#, running on Mono. We build, debug, etc. on Windows, then deploy the binaries to Linux. It works surprisingly well. These aren't massive systems, and I tend to deplore the handful of core systems (i.e. website) on Windows but all the actual call handling goes on Windows.
The real problem with Mono was the naive GC which for some applications had very degenerate and broken behaviour. AFAIK, the sgen GC has cleared that all up.
Your characterization of the comments are very misleading.
Costs Involved...This is the point where C# really sucks. Almost every tool, OS, IDEs and plugins, are paid.
Anyone can download Visual Studio 2013 Express edition. The Express edition has been free since Visual Studio 2005. Here's a download link:
http://www.microsoft.com/visualstudio/eng/downloads
Click on Visual Studio Express.
Of course, there are limitations but there are fantastic projects out there that have been made with all free Microsoft development tools. Visual Studio 2013 Express is really an amazing, free development environment. Combine it with SQL Server 2012 Express which is the free version of SQL Server that works on databases up to 10 GB and you can see you can do a lot with free Microsoft software.
See more info on Visual Studio Express here:
http://en.wikipedia.org/wiki/Microsoft_Visual_Studio_Express
I can't think of any tools for .net that are really must-haves and that cost money. Maybe resharper but you can survive without it. There are free profilers, decompilers, analysis tools, SCMs, you name it. The only thing you don't get with express is integration with plugins in the IDE. Using .NET with free tools is also easy, connecting to MySQL is just as easy as to MS SQL Server to give an example.
Eclipse has supported Python(with code assist,and class introspection) quite well for a long time before Pycharm. So it's not true.
Anyway most Pythonlsts only use text editors.
How am I biased? I don't work for Microsoft. If using a technology stack makes one biased and thereby (as you imply) invalidates their opinion, then let's just shut down Hacker News right now because nobody is capable of expressing an unbiased opinion in your opinion.
The reality is that Microsoft has free development tools that millions of people use - for free.
I love C#. I have a project right now built in it. Everybody talks async/await--which is certainly great--but there is a lot to love in C# and .NET that have been there for a long time. Real generics. The reflection libraries are outstanding and extent easy to use. Dynamic assembly loading is just downright awesome and also easy to implement. I could go on, but there is a beer in front ooh me getting warm.
Real generics, as in generic programming? As in, this: http://www.haskell.org/haskellwiki/Research_papers/Generics ? The last time I saw C# (2.0?), it only had simple parametric polymorphism.
You're right though -- the .NET CLR type system (specified in ECMA-335) basically supports only a simple form of parametric polymorphism with subtyping constraints, along with co- and contra-variance. The idea is to allow some limited forms of generic programming while keeping the type system simple enough that it doesn't impose significant overhead during JIT compilation. Another advantage, is that it allows the JIT compiler to generate type-specialized code, which offers a significant performance advantage for unboxed value types.
The F# type system is a little more powerful, though anything it offers beyond what the CLR officially supports gets erased when the program is compiled (e.g., unit-of-measure types). See: http://msdn.microsoft.com/en-us/library/vstudio/dd548046.asp...
One interesting thing I've realized recently is that F# could potentially support GADTs in the future, just like Haskell and OCaml. The hard part -- the GADT type inference -- would take place at compile time, so there shouldn't be any problems encoding the result (the inferred type) in the CLR's type system.
If you're interested in type systems (and as a Haskeller, I imagine you are), there's also F* -- it's a dependently-typed variant of F# which is being used for verification research at MSR: https://research.microsoft.com/en-us/projects/fstar/
Bah! Interested, definitely yes, but I share Alan Kay's point of view that "I like type systems but I don't know any that doesn't suck", so in this particular area, I'm a bit of a Luddite. (I'm much more of a lisper in heart.)
Probably many are aware, but there is a free Express version of Visual Studio. I stopped paying for Visual Studio a couple releases ago and have been getting by quite nicely with the free version.
Xamarin fixes all of these problems. But then, the free version is limited and the paid version is very expensive. When it comes to IDEs, you really do get what you pay for.
For example, plugins support.
Assume I have to buy the expensive $10K Visual Studio license then pay $3K/year after that. Put developer cost at $100K per year. You need only a 10% productivity gain to break even in year one.
My thoughts are that I'd get 10% just from the awesome Intellisense code completion and navigation support or from the Entity framework.
...
My only reservation about C#/.Net is that all of my peers are in the Unix side of the world. I feel like Microsoft has been losing mindshare among the top tier of engineers. Oh, and it is really nice to be able to spin up 1000 VMs without having to pay an OS tariff.
About a year ago, I picked up Python because I wanted to build a site using Django. I decided to fire up my Ubuntu VM, and work my way through the official tutorial. The language was easy enough to pick up and within a day I finished the tool I was building. However, I would have finished it in half the time if I was working on Windows. As much as I love the Terminal, my main time-sink was getting used to working in Linux again. After two hours I ended up downloading PyCharm because Eclipse was as awful as I remember it from my Java days (I downloaded Eclipse because using a text-editor was so slow!). I know some fantastic C# developers, but if they wanted to work in Ruby, Python, or any other language outside of the .NET framework I bet that most of them would struggle; not with the language, but with the tooling and Linux.
I absolutely love .NET and C#, and I'm very happy working with them, but I don't like the idea of being restricted. If I lost my job and a great opportunity came up in a Python shop I'd like to be confident in my ability to move to a different platform. That jump seems 10x worse if you're also jumping OS.
Either way I'll take my high paying stable multi year .NET contracts in F#/C# by day and code in Haskell by night.
As a full time .NET consultant I have never needed more than the $500 VS Pro + Sql Server Dev Edition ($50) + Resharper ($80).
Now consider India, Latin America and other countries.
For example: I live in Salvador - Brazil here a developer costs $10k-$20k per year.
In this scenario, this tools represent between 50%-100% of the developer cost.
I think that in India it's even worst.
Which is 0% of the developer cost.
Thank you for the clarification.
However, at those salaries, I could hire you and 2 of your friends, pay for the tools, and still come out at $100K.
I've got a tremendous amount of respect for technical talent in the rest of the world (i.e. -- most of the smart people in the world don't live in SF) but the problem I have is that I have no clue about how to find, hire, and manage really good people outside of the US. Hell, it is hard enough with a common language and culture.
e.g. Visual Studio costs $500 in the US, but it's at least twice that here in Australia.
I've actually found it to be incredibly strong, but they've centralized around StackOverflow rather than Microsoft's forums. There's not a ton of activity on Github, but it's by no means a small community; and as far as I've seen most of the projects are quite collegial.
Whether you love it, hate it, or simply have to live with it, the dotnet platform is pretty robust -- you can create a LOT of different things with it. Web, desktop, service, mobile -- it may not be the best in any or all of those scenarios, but it's all very do-able with their toolset.
As with any technical platform, it's really best evaluated for depth in specific scenarios.
http://www.zdnet.com/why-does-the-it-industry-continue-to-li...
http://www.gsmdome.com/blackberry/gartner-predictions-not-so...
http://www.roughlydrafted.com/2012/10/21/three-years-ago-gar...
http://betanews.com/2010/09/13/are-idc-and-gartner-mobile-os...
That's like doing "#define BEGIN {" in C.
I'd also make a note that if you're considering .NET, F# is a better language than C# in nearly every aspect. C#'s development is practically stagnated, at least from an outsider's point of view.
As a comparison, the F# code of his example is just:
type Student = { Age: int; Name: string }
let student = { Age = 17; Name = "Paulo Ortins" }
let PrintAdultStudent student = if student.Age > 18 then printfn "%s" student.Name
That's 176 significant chars versus 267, and as normally formatted, 3 lines versus ~9. Once you start using F#, going back to C# is just painful due to the incredible verbosity and lack of critical things like pattern matching (active patterns are amazing) and good type inference.But without comparing it to F#, Microsoft has not polished the C# 3.0 design. Expression trees are still half implemented (no way to call one exptree from another). MS created anonymous types, but neglected to add simple types like tuples (let alone anything more advanced). Type inference is still ridiculously limited in scope:
- Neither parameters nor members can be type inferred.
- Local function vars can't be type inferred (because they chose identical syntax for expression trees).
- Generic constraints can't be type inferred.
- Generic parameters have limited inference. If one parameter can't be inferred, you _must_ specify all of them.
On one of the developer blogs, they noted that the reason fields couldn't be inferred was really due to internal compiler codebase complexity. Yet 5 years later, that's still not taken care of. Basically, they aimed for the LINQ outcome, and implemented the required feature set only within the context of LINQ, not for the language as a whole. Which is fine for V3. But then they just left it at that.C# is truly a great language; it was just created by people who have different priorities than you (or I) do.
return Tuple.Create(valueA, valueB);
Likewise being able to declare functions as returning multiple values in a natural fashion would be really cool.But both of those changes are very much sugar, neither of them would make the language more powerful.
[1]http://msdn.microsoft.com/en-us/library/system.tuple.aspx
Also, this is more of a Visual Studio/web framework issue. The VS people chose to ignore F# with their project type specifications. And the MVC people are very C# oriented, depending on C#-compiler implementation details for many of their methods.
Frameworks like WebSharper, for example, allow you to use full F# across the stack.
On the other hand, using MVC with F# controllers is very smooth, and you can use C# on the rendering engine, as there's rarely much code at all going into the actual view part.
The F# Foundation site has up-to-date information: http://fsharp.org/webstacks/
About the only thing I know of that you can't do with F# right now (in terms of web development) is write inline code in ASP.NET MVC Razor views. That's not too big a deal though, since you can still write the guts of the application (e.g., your controllers) in F#.
Ever hear of StackOverflow? There are thousands of tight-knit .NET and C# based communities.
I hope nobody is seriously putting money on the windows phone passing ios by 2015. The odds have got to be at least 500 to 1 it doesn't happen.
When I made the bet my friend (who works in the cell phone division for an large multinational) was adamant that Android would take over. In the past year the company has decided to removed all Android devices due to support cost/issues and moved to iOS. (I don't know the specifics as to what the android problems where, so don't bother asking, but he said management was very unhappy with them).
I don't see iOS being more useful to a business in the long than windows phone. I'd say in two years time when they review purchasing again that iOS isn't the favored choice, and my bet finally come to fruition.
I've used C#/.NET for years now, and it's been quite good - no real complaints and a lot of enjoyment. Also, you don't have to worry about expense when you're company buys the tools, and I believe there are some good discounts if you have Microsoft Certified type people on your staff.
They already gave F# away to the community. I don't see why they can't do the same thing with C# and hopefully all of .NET. Maybe the post-Ballmer MS will do it.
It's a tough sell, though -- even with the underdog situation. Java took the approach of running everywhere, and Sun really didn't manage it well. I'm not sure MS is ready or able to participate in a world where the platform isn't the central ideology.
[1] http://arstechnica.com/tech-policy/2013/10/patent-war-goes-n...
Actually, they have already given a patent grant for C# and .Net. Nobody cared, except the Ximian guys (now Xamarin, which has always been an awesome team).
http://csharpindepth.com/articles/chapter1/Specifications.as...
.NET/C# + cloud all the way.
It is great that it improved upon what Java was lacking, but I think the C# team is starting to go too far adding too much.
But I've not worked on an "Enterprise" project, and I assume the main goal there is making sure you can hire anyone and make sure they can understand how to add a new rule for e.g. Alaska sales tax.
BTW, there's also lightswitch , which offers really simple development for database apps.
And there's .netmf , which lets you use modern ,memory managed language to develop some types of microcontroller systems.
While referring to a xamarin app there is a screenshot of a sample app with a caption "The same application with native controls and sharing almost 75% of the code base."
Is this xamarin code base shared somewhere?
Also, if there is a significant growth in the share of Windows phone ? Would you use still use Xamarin to develop for Windows phone or would you use Visual Studio?
Xamarin only needs to fill in the gaps, which are iOS, Mac and Android.
C#, the language:
Pros:
* The most elegant of this family of languages (statically typed curly bracket imperative).
* If you are coming from C++: C# is Feature rich but still not too large to make it "choose your own sublanguage" like C++ (yet). You can actually learn this language from the inside out. There are few undefined implementation details and quite few quirks.
* The tooling is fantastic if you can agree to using windows and shell out some money.
Cons:
* It was designed to rival C++ and Java with a nice learning curve for C++/Java devs. If it was designed today, I think it would have a lot more modern/functional features built in such as tuple deconstruction, algebraic data types/pattern matching (instead of Null) and so on. Now when you use F#, C# feels old with its only half-decent type inference, null keyword and so on.
* Performance (This is actually more .NET than C#): While it can be quite performant, idiomatic C# is still often quite slow. Especially in the hands of non experienced developers. There are often hidden allocations and boxing calls that are hidden behind syntax sugar, that end up taxing the garbage collector (example: A simple foreach call often allocates an object which later gets eligible for GC). So writing high performance code is possible in C# but still very hard. You'll find yourself either making the code look like C (for example: arrays of structs rather than lists of objects which was the idiomatic solution), or simply calling to C/C++ for performance sensitive bits. In comparison to C++ for high performance code, I'd say C# offers free reliability/conciseness etc., and you have to struggle with perf. With C++ you'd get a lot of perf for free because idiomatic C++ is fast (array of structs may well be an idiomatic solution!), but instead you may struggle with leaks, overruns, token salad... Bottom line: C# can often be as fast as C++ but when it is, it's no easier than just using C++ because you have to make allocation free code basically (which is HARD, especially as an afterthougt).
.NET, the platform:
Pros:
* It feels like they looked at java and just corrected a lot of the problems. Sane dependency/versioning is just one example.
* The community is very much alive. Stackoverflow has become the center of it in later years.
* Frameworks evolve at a stunning pace. If you blink you missed two versions of ASP.NET MVC.
Cons:
* Same as above. Hard to keep up with things if you aren't working full time on it. The webpage you did last week is now two frameworks away from the latest version. You spend a lot of time upgrading code to newer frameworks.
* The GAC is a horrible implementation of a good idea. The fact that you can't really use signing in a useful way without it also feels like a mistake.
* The free versions of everything (compiler, IDE, servers..) feel like second class citizens. You can't code up a prototype webpage in the latest framework and expect it to run on an OSS server under linux. It's hard to know what subset of language/tools/frameworks actually work under e.g. Apache+Mono. A clear disadvantage compared to Node/Python etc.
* It feels like Microsoft has a bit of a weird relationship with .NET, or rather, it feels like the OS division of microsoft never really accepted .NET while it has stayed the pet of DevDiv. The worse examples has been the slow death of Silverlight (I can see how it should die, but the silence from microsoft has been remarkable). Now it also seems that MS don't really have a plan for how .NET should be a first class citizen for both desktop and "modern" application development under Win8, instead pushing C++. That to me is extremely worrying.
Assemblies: think JAR files, Python eggs, Ruby gems. They're collection of classes, which can be grouped into modules.
Modules: a collection of classes. 99% of the time, there is one module in an assembly. Modules are effectively invisible for developers in all contexts; they really come up when you combine a pile of existing assemblies into one big master assembly for distribution, in which case that master assembly will have multiple modules, but as a developer, the main way that this would show up is that the things that were previously their own assemblies still act as if they're all in separate assemblies.
The GAC: This is what it sounds like: the global assembly cache. It allows multiple programs to safely use the same DLL, so that you only need to have one copy on your machine.
I've not actually heard of people getting totally lost in the .NET 2 to 4 transition, but I'm sure it's happened. That said, that's also happened in the Go world (especially due to their lack of versioning), in the Python world (especially as 2 to 3 starts actually happening), in the Java world (where someone didn't specify full versions for what JARs they were using, and the new ones conflict), and a bunch of other environments. I don't consider that .NET-specific.
Silverlight deserved to die. But somewhere along the line the Windows division got the wrong end of the stick and thought that meant all of .NET too.
They've stopped the rot now between the DevDiv and Windows divisions. Heads were banged together over that one. Sinofsky was blatantly behind it, that's why he got sacked. It wasn't about Windows 8 not being a good product (it was). It was because he was running the show like Steve Jobs did in the 80s; actively fostering mistrust between teams and undermining intra-division communication and respect.
I don't think the Windows division will ever fully respect .NET for what it is until some of the old guard have moved on. Which is a real shame. It is a first class programming stack that is practically unrivalled.