Earlier quoted context omitted.
To be fair, understanding I/O in Haskell takes quite a bit of mental gymnastics. :) The I/O monad modifies the Universe that contains the set of all functions that comprise your program (if I even understand the concept correctly).
The IO monad is just an action. Its a cons pair with a left and a right half. In an imperative language you could model the left half with a closure that takes no arguments, does I/O and produces a value. The right half is usually empty, except when you use the `>>=` operator (or flatMap) on an existing action, e.g. let c = a >>= f That operator chains the function `f` can take the value produced by the first IO acti…
Microsoft takes .NET open source and cross-platform
661–670 of 937 posts
Re: Microsoft takes .NET open source and cross-platform
#662Earlier quoted context omitted.
> A talented C# dev will need to know co/contravariance as well as implicits considering they also exist in C#. True for co/contravariance. For implicits, that depends on which implicits you are talking about. Scala has: * implicit conversion operators (these have existed in C# for some time, under the same name) * implicit parameters (C# doesn't have an analog to these that I can think of) * implicit classes (C# has…
> implicit parameters (C# doesn't have an analog to these that I can think of) C# allows default values for parameters, but it's not quite the same. Example of C# default value for parameter: static void Addition(int a, int b = 42) { Console.WriteLine(a + b); } Addition(4); // Prints 46 Addition(4, 5); // Prints 9 In Scala, the default (implicit) value has more complex rules. Like C#, implicit parameters must come af…
Right. Scala has C#-style default parameters as well, implicit parameters are a different (though very loosely related) thing.
Re: Microsoft takes .NET open source and cross-platform
#663So, Microsoft is finally adapting. But what are they actually doing? Why did Microsoft finally decided to make .Net cross-platform? What's in it for them?
Look at what's in this shiny new package: They've open-sourced just the core runtime. They are not open-sourcing Visual Studio. Or WPF. Or SQL Server. Or Active Directory. Or Office.
There's one thing the Linux ecosystem is pretty good at: Scaling, both up and down. There are technical reasons for that, but none could possibly be an issue for a software powerhouse the size of Microsoft. There are also commercial reasons for that, most important being: You just can't beat free.
So that's what Microsoft is finally moving against -- Dear startup founder who is afraid that licensing costs will eat him/her alive while his/her "Growth Hacking" strategy is working, dear embedded programmer whose tiny IoT device that just can't cope with the whole Windows mumbo-jumbo, welcome to the Microsoft platform -- You can now safely run your C# on these free platforms as well.
So, Microsoft is finally back in the game. They even seem to be playing nice. But the question in everyone's mind is: For how long?
Re: Microsoft takes .NET open source and cross-platform
#664I see so much emotion in this thread. Yes, I was there to witness what M$FT (ha! take that Mr. Gates!) did around the dawn of this millenium as well, but we had all felt that the times they were a-changin' when Slashdot retired the Bill-the-evil-Borg image already. It's just Microsoft refused to adapt until now, which e.g. made them miss The Mobile in its entirety. So, Microsoft is finally adapting. But what are they…
I think a better question might be: what next? (Disclaimer: optimistic MS employee)
Re: Microsoft takes .NET open source and cross-platform
#665Earlier quoted context omitted.
> - Netscape If you are referring to Microsoft's bundling of IE, that did not kill Netscape. It just buried the rotting corpse. Before IE was bundled with Windows, it was sold in stores as a boxed product, right next to Netscape's boxed product. Going head to head in retail software stores (Egghead, CompUSA), IE massively outsold Netscape. This is what killed Netscape. The reason IE outsold Netscape at retail was sim…
All those "Best on IE" and "Best viewed on Netscape" image buttons from back in the day... I thought I had forgotten about them, but you had to drag them up from the depths... ;)
You thought you had forgotten about something? How does that work.
Re: Microsoft takes .NET open source and cross-platform
#666Earlier quoted context omitted.
Can you give me examples of implicits in C# ? I am unable to see a parallel.
using System; public class Program { public class Person { private string _name; private int _age; public Person(string name, int age) { _name = name; _age = age; } public static implicit operator int(Person p) { return 42; } } public static void Main() { var person = new Person("Jim", 51); var number = 100; AdditionPrinter(person, number); // Prints 142 } public static void AdditionPrinter(int a, int b) { Console.Wr…
Re: Microsoft takes .NET open source and cross-platform
#667Earlier quoted context omitted.
Generics, Partial Classes, awesome Reflection API, Lambda syntax, LINQ, C/C++ compatibility, async/await, concurrency primitives, etc. I have worked with prettier languages, for instance I have picked up Haskell recently, I have also worked with faster languages, C was my forte for many years and I have worked with languages in the GSD category like Ruby and Python. C# is appealing not because of some feature that it…
async/await is HUGE. It opens an almost frictionless asynchronous pathway from your code all the way down to asynchronous capabilities of the underlying platform. Which was always the problem with leveraging async/overlapped IO: It was too complex and it turned your application logic inside-out because everything had to be performed in callbacks. async/await takes that on directly: You get everything executed in call…
Also as of recently there is a standard library event loop package, and as far as I know Twisted was the defacto event loop on 2.x for most types of work.
Re: Microsoft takes .NET open source and cross-platform
#668Re: Microsoft takes .NET open source and cross-platform
#669Earlier quoted context omitted.
>I'll never switch back to MS for what they've done in the past I'm not sure what they've done to receive such hatred. They are just a technology company and are trying to sell the product.
> I'm not sure what they've done to receive such hatred. Hatred? I simply decide not to buy into a certain company's products and services because I recall some misdeeds from the past and that's equal to hatred? As for what they have done, I thought Microsofts history was chronicled enough that it doesn't need repetition, especially not on a website for 'hackers'. But if you need pointers, you can go visit groklaw.ne…