News for hackers. Stuff that matters.
Re:How generics were added to .NET by EnderMB on Tuesday March 06, 2018 @04:59AM (#16527921)
LINQ is the reason I became a .NET developer after leaving university.

I was bored of Java at university, and as the project I was basing my dissertation on was a web-based search engine I decided to use C# and ASP.NET. The professor helping me was fine with it, since he didn't know PHP or Ruby, and he felt he could read C#.

I came across some stumbling blocks with some logic, so I remember posting on a forum somewhere asking for help with setting up a data structure. Someone sent me some LINQ, and I thanked them for the pseudocode. When they pointed out that it was real functioning code, I plopped it into Visual Studio and the whole thing worked. From that moment, I fell in love with the language - ASP.NET WebForms less so, but shortly after this MVC became a thing in the .NET world and I jumped on the bandwagon.

A decade later, and while I've moved onto other languages I still fight C#'s corner, and LINQ/the lambda syntax is one of the first points I raise when people bitch about Micro$oft. The only negatives about working as a .NET developer is being locking into an ecosystem, so if Microsoft and the .NET Foundation can get .NET Core to be feature compatible with .NET Standard then they've got a winner on their hands.

Re:How generics were added to .NET by mythz on Tuesday March 06, 2018 @11:11AM (#16529701)
Many other languages offer similar functional APIs for querying collections, here is C#'s 101 LINQ Examples rewritten in different languages:

   https://github.com/mythz/swift-linq-examples
   https://github.com/mythz/kotlin-linq-examples
   https://github.com/mythz/clojure-linq-examples
   https://github.com/mythz/java-linq-examples
   https://github.com/mythz/dart-linq-examples
   https://github.com/omnibs/elixir-linq-examples
   http://templates.servicestack.net/linq/
Java 8+ has since improved with their Streams API. The primary benefit that differentiates LINQ apart is that you can easily capture the Expression tree of the LINQ expression and rewrite its intent to apply to other sources, commonly used in LINQ -> SQL to provide a Typed Expression API for generating equivalent SQL to run on an RDBMS.
Re:How generics were added to .NET by dvlsg on Tuesday March 06, 2018 @12:34PM (#16530350)
Not op, but I think these are the equivalent of linq to objects. Linq also has the capability to treat lambdas as expression objects, so instead of executing them, you may further interpret them and turn them into something else. Like sql statements.
Re:How generics were added to .NET by mythz on Tuesday March 06, 2018 @04:07PM (#16532126)
I covered capturing LINQ expressions in my last sentence.
Re:How generics were added to .NET by ozim on Tuesday March 06, 2018 @05:38AM (#16528036)
I am .NET developer, I thought I will be Java dev or whatever else web backend brings. But years are showing .NET is getting well. Msft has skin in the game with .NET ecosystem and it is "developers, developers, developers". Other ecosystems don't have huge company living off it. Oracle for Java also does not have skin in the game, they will just take over next big thing and milk it away.
Re:How generics were added to .NET by pjmlp on Tuesday March 06, 2018 @06:20AM (#16528147)
Oracle was one of the first companies to adopt Java.

They used to do presentations together with Sun, had the crazy Network Computer idea together with those Java Stations at Sun, ported their installers to Java, were the first RDBMS to allow stored procedures to be written in Java, had their own JVM, IDE and JEE server long before Sun started to get into troubles.

Have kept Java team together, saved Sun labs, turned the Maxime research work into Graal, are making the effort of supporting AOT compilation (tabu at Sun),....

I am a polyglot developer, and while Oracle could be doing a better job, they surely are doing much better than Sun was doing on its later days.

Who knows, if Google hadn't ripped off Sun and they were getting some Android revenue, maybe Sun would still be around.

Re:How generics were added to .NET by geodel on Tuesday March 06, 2018 @09:33AM (#16529058)
> Who knows, if Google hadn't ripped off Sun and they were getting some Android revenue, maybe Sun would still be around.

Or maybe if Sun showed some promise with J2ME and tried to challenge iOS it would have been main iOS competitor instead of Android. But J2ME did not deliver much and the idea to grab some bullshit patents revenue, which Oracle tried, failed.

In copyright case Oracle may still get some money but after belatedly joining CNCF Oracle would not like to be on warpath with Google.

Re:How generics were added to .NET by pjmlp on Tuesday March 06, 2018 @09:39AM (#16529089)
J2ME was doing perfectly fine in Nokia and Sony-Ericson devices, and we already had SavaJe OS when Android happened.

Android fragmentation, OEM customizations, lack of enforced updates and cheapo unresponsive 100 € devices are no better than the devices that gave bad name to J2ME.

Re:How generics were added to .NET by lloydatkinson on Friday March 09, 2018 @11:50AM (#16552992)
> so if Microsoft and the .NET Foundation can get .NET Core to be feature compatible with .NET Standard

What? It literally already is, all the time. If anything it's full .NET that lags behind standard often.