Live data from Hacker News

Understanding .NET 2015

blogs.msdn.com

31–40 of 107 posts

Re: Understanding .NET 2015

#32
post #13

Earlier quoted context omitted.

It is and it isn't. LINQ is actually incredibly smart under the hood, so if I ran: myList.Where(x => x.name = 'Person'); .Where(x => x.age > 18); .ToList(); it wouldn't actually run two different array filters - it would combine them. You can imagine the performance gains to be had there.

Well, underscore offers this, from the docs: _.where(listOfPlays, {author: "Shakespeare", year: 1611});

That's not the same, though; that's you purposefully combining your query (which you can do in LINQ).

LINQ doesn't just combine Wheres. It tries to optimize your query as much as possible and executes lazily, so you aren't actually doing any work until you try to use the resultset (in a ToList, for example).

Re: Understanding .NET 2015

#33
post #16

It looks like the open source cross-platform version of .NET, v5 ("core"?), is something that was written completely from scratch? Why wouldn't they open source the v4.x version? And why is WPF, Windows Forms, and ASP.NET placed above the .NET 4.x block in the diagram? Is .NET v5 Core a from-scratch lightweight reimplementation that can't run the full stack? If not, why the huge separation?

It is fairly clear on the GitHub repositories.

It's not a reimplementation but a gradual publish of existing code, upgraded to meet the required standards (some of it was not written with being open in mind).

WPF will not be available on non-Windows platforms. That has always been the case and will remain so - it has a far to deep integration with the OS for it to ever be platform independent and a reimplementation would be an absolutely ginormous effort.

Re: Understanding .NET 2015

#34
post #25

I thought Microsoft was phasing out .NET and encouraging people to write their GUIs in JavaScript. That's what they were saying early last year.

They never said that. WinJS was just another possibility alongside .NET and C++/CX.

Re: Understanding .NET 2015

#35
post #2

Recently I got to use some C# on Linux (with Mono framework), and I gotta say it wasn't bad. I didn't do anything with GUI elements, was all back-end server code. C# wouldn't be my top "go to" language, but I would put it above Java. I liked some of the generics handling better, it can be less verbose it seems. Monodevelop is not on par with Visual Studio, but it is solid and worked well for me. I usually don't like…

> I liked some of the generics handling better, it can be less verbose it seems. It pays off in spades in a lot of situations, but the biggest I've noticed is Android development. Hitting a network from a button press in Xamarin is as simple as: button.OnClick += async { var data = HitTheNetworkForSomeData(); // Note that since this is still async, // you may want to set a global or have a // different approach to ha…

It's a shame Android is still stuck on Java pre-8, as your Java example could be nearly as consise as the c# with Java 8.

Re: Understanding .NET 2015

#36
post #21
post #2

Recently I got to use some C# on Linux (with Mono framework), and I gotta say it wasn't bad. I didn't do anything with GUI elements, was all back-end server code. C# wouldn't be my top "go to" language, but I would put it above Java. I liked some of the generics handling better, it can be less verbose it seems. Monodevelop is not on par with Visual Studio, but it is solid and worked well for me. I usually don't like…

"we'll start seeing more back-end usage of .NET." Outside of startup world, it is already used everywhere.

Well, I can assure you that Java is used.. more everywhere.

Re: Understanding .NET 2015

#37
post #33
post #16

It looks like the open source cross-platform version of .NET, v5 ("core"?), is something that was written completely from scratch? Why wouldn't they open source the v4.x version? And why is WPF, Windows Forms, and ASP.NET placed above the .NET 4.x block in the diagram? Is .NET v5 Core a from-scratch lightweight reimplementation that can't run the full stack? If not, why the huge separation?

It is fairly clear on the GitHub repositories. It's not a reimplementation but a gradual publish of existing code, upgraded to meet the required standards (some of it was not written with being open in mind). WPF will not be available on non-Windows platforms. That has always been the case and will remain so - it has a far to deep integration with the OS for it to ever be platform independent and a reimplementation w…

Thanks for clarifying.

And on a tangent, I guess the WPF thing was expected. But! I also thought WPF is mostly a re-implementation of all the windows widgets on top of a framebuffer - it doesn't use native win32 buttons, dropdowns, text rendering, etc etc...?

Re: Understanding .NET 2015

#38

Earlier quoted context omitted.

Well, underscore offers this, from the docs: _.where(listOfPlays, {author: "Shakespeare", year: 1611});

That's not the same, though; that's you purposefully combining your query (which you can do in LINQ). LINQ doesn't just combine Wheres. It tries to optimize your query as much as possible and executes lazily, so you aren't actually doing any work until you try to use the resultset (in a ToList, for example).

Yes. IQueryable actually implements an expression tree, which means that it may never be executed, at least directly. LINQ to Entities (Entity Framework) actually evaluates the expression tree to build SQL statements, then runs those and returns the results (after coercion back to the mapped POCO object).

Re: Understanding .NET 2015

#40

Earlier quoted context omitted.

Well, underscore offers this, from the docs: _.where(listOfPlays, {author: "Shakespeare", year: 1611});

That's not the same, though; that's you purposefully combining your query (which you can do in LINQ). LINQ doesn't just combine Wheres. It tries to optimize your query as much as possible and executes lazily, so you aren't actually doing any work until you try to use the resultset (in a ToList, for example).

I don't know about Underscore, but lo-dash [0] supports lazy execution of a chained query without generating intermediate arrays (see docs [1]). It offers something pretty similar to LINQ queries on collections (except you don't get the benefit of strong typing).

[0]: https://lodash.com/

[1]: https://lodash.com/docs#_

Post reply on HN