News for hackers. Stuff that matters.
Re:Span<T> in C# by jmkni on Saturday November 18, 2017 @08:09PM (#15731680)
I feel as though, with C#, Microsoft's brilliance was to get a number of very clever people in a room together (Anders Hejlsberg, Eric Lippert, etc).

Somebody at Microsoft said to themselves, these guys are clearly brilliant, let's see what happens if we hire them all, task them with creating a new object oriented programming language, pay them a tonne of money, and see what happens.

C# was the result, and it's awesome!

Re:Span<T> in C# by na85 on Saturday November 18, 2017 @09:04PM (#15731833)
The problem with C# for me is the fragmented ecosystem that's hard to navigate, coupled with dense and hard to find documentation that seems to be spread out over 14 different msdn domains and GitHub projects.

CoreFX? CoreCLR? No idea what these are or what they're for.

And don't get me started on the dumpster fire that is roslyn. I've tried no less than 10 times over the last few months to get "intellisense" working in emacs via roslyn and it has never worked.

C#'s a cool language that I want to like but it's just so much work to get started with.

Re:Span<T> in C# by shadowmint on Saturday November 18, 2017 @11:08PM (#15732197)
To be fair, C# is a chore without good tooling.

I used to use omnisharp with atom and frankly it was just rubbish. It crashed all the time and required constant restarts, and (still) takes a massive amount of time (and memory) to start.

I went back to using golang, and didn’t regret it for a second. The tooling in go is excellent and you can use a simple editor for many things. That’s really compelling for people.

So... to be fair, if you were to idly pickup .net core as a linux user, and expect vim or emacs to do the job, you’ll find it a terrible experience.

...but, with the right tooling, it can be really great. vs, cscode or rider (not free) make using c# a pleasure to work with.

The dotnet cli tool is still quite terrible (how do you install dotnet watch again? why does it take 25s to restart a simple web app? You think git has obscure inconsistent incomprehensible command line flags...? ha! remind me why ‘dotnet build’ is running like 50 shell commands from the .csproj file...but only in this configuration you didn’t specify excplictly? surprise!) ...but its usable, and its slowly improving.

I feel like a lot of C# enthusiasts shoot down complaints as people being rubbish, or trolling or ‘doing it wrong’; but the reality is c# on a platform other than windows is new, and still pretty raw.

Pointing people in the right direction (you do need a proper IDE) and acknowledging that doesn’t suit everyone is better than telling them they’re ‘doing it wrong’; thats just jerk behaviour and comes off as fanboiism.

Re:Span<T> in C# by paulddraper on Sunday November 19, 2017 @05:24PM (#15736296)
C#'s bread-and-butter was desktop apps and then web servers.

I've yet to see good Windows GUI support for Go.

Re:Span<T> in C# by pjmlp on Monday November 20, 2017 @04:38AM (#15738813)
Let me know when Go has something comparable to Windows Forms, WPF, UWP, Xamarin.Forms, Avalonia.

Oh, and when I have to use Go, I find a chore to write generic code as if I was back in 1992 using Borland C++ 2.0 for MS-DOS, with pre-processor based code generation for BIDS or still using Java 1.4 (EOL in 2008).

Re:Span<T> in C# by shadowmint on Monday November 20, 2017 @07:51AM (#15739526)
When was the last time you wrote a micro service that compiled to a single binary and interop'd seamlessly using grpc in C#?

I'm going to guess the answer is never, because it's basically impossible to do.

Do you care? I doubt it, but some people really do.

It's just different use cases for different things. Sure, go has its problems, but needing a large heavy IDE isn't one of them. That's really important to some people.

/shrug

> Oh, and when I have to use Go, I find a chore to write generic code...

Oh man, don't even start. If you don't like go, don't use it. It was just one example of tooling that's better than C#. Rust, node, clojure, heck, even python has a better story for 'pick up and start using' than C# does at the moment.

Do we really need to start digging down into how fundamentally terrible nuget is as a package manager, and how I personally find it like installing Master of Magic using 3 1/4 inch disks one by one when it screws up, or the feed screws up (like it did TODAY for about 4 hours)?

nah. No one cares.

Let's just leave it at: There are some valid concerns people have with the C# ecosystem, and using C# on non-windows platforms. It's a work in progress.

At least we now have a coherent direction for everything going forward~

Re:Span<T> in C# by pjmlp on Monday November 20, 2017 @09:11AM (#15739936)
> I'm going to guess the answer is never, because it's basically impossible to do.

You mean by using something like Mono -aot, CoreRT, IL2CPP?

> Do we really need to start digging down into how fundamentally terrible nuget is as a package manager,

No, because in spite its issues, it still runs circles around the half-baked solutions that Go devs are still trying to fix.

Re:Span<T> in C# by shadowmint on Thursday November 23, 2017 @07:37AM (#15764619)
I'm not even going to bother.

Nuget is such a pile of rubbish it's not even worth arguing about; if that's the best package manager you've ever used, you should really go check https://github.com/fsprojects/Paket out.

(they also helpfully articulate why nuget isn't really very good)

The irony is that the folk from go-world have finally acknowledged the package management solution they have is really terrible, and they're building a lovely new one (https://github.com/golang/dep).

Maybe sometime in the future you'll be eating your words, when go has a lovely package manager.

...and c# still has nuget.

:)

Re:Span<T> in C# by lwansbrough on Saturday November 18, 2017 @09:17PM (#15731867)
There are many more names for things in C# than what you really need to be aware of as a C# developer. Want to write C# that targets Linux? Download the .NET Core SDK. Simple as. Everything else: .NET Standard, .NET Framework, are just names used by the .NET contributors to keep things straight in their head, but you honestly rarely deal with that stuff if you’re starting fresh with .NET Core.

If you’re trying to write C# in emacs you’re doing it wrong. C# has probably the best tooling in the world if you embrace it.

Re:Span<T> in C# by Pxtl on Saturday November 18, 2017 @11:03PM (#15732181)
C# has a decade and a half of hyper-fast Microsoft-funded idea churn behind it, so I agree that it can be super confusing. It's very hard to distill it down to the "modern" stack when every Google hit gives you piles of results that are painfully out of date.

I love c#, but I've been using it since '05. I don't envy newcomers.

Re:Span<T> in C# by qdot76367 on Saturday November 18, 2017 @09:22PM (#15731875)
Agreed. I basically live in emacs, but for C#, I'm in VS 2017 community and it works great.
Re:Span<T> in C# by sauliusm on Sunday November 19, 2017 @04:23AM (#15733036)
What is it with using C# w/ emacs that is wrong? Compared to say development of Java or python code on emacs? Although it doesn't have all the tooling present from say VS, it is still managable with refactoring, autocompletion and some more functionality working already.

I am the current maintainer of omnisharp-emacs and would love to know out what are the most pressing problems people encounter using C# on emacs via omnisharp - https://github.com/OmniSharp/omnisharp-emacs

Re:Span<T> in C# by lwansbrough on Sunday November 19, 2017 @05:52AM (#15733330)
I've never been one of those guys who gets super into his editor, as I don't see it as being the driving force in productivity or efficiency. VS Code or VS Community are my go-to, because they have all the features that are possible. I'm not being pulled away to find a solution to a solved problem: it's there, and it's solved.

How does time travel debugging work in emacs?

Re:Span<T> in C# by sauliusm on Sunday November 19, 2017 @09:09AM (#15733939)
Ah, .NET debugging is not implemented in omnisharp-emacs as debugger service is not provided by the underlying omnisharp-roslyn project (the parent language server project).

So you are expected to download VS Code, use sdb or something else if you want to have step-by-step debugger...

Re:Span<T> in C# by sauliusm on Sunday November 19, 2017 @04:19AM (#15733028)
Hey, current maintainer of omnisharp-emacs here.

Would you be willing to submit an issue to github about the problems you have encountered (if not already?)

I would love to make the experience of using C# on emacs with omnisharp-emacs easier for people.

Re:Span<T> in C# by will_hughes on Sunday November 19, 2017 @09:44AM (#15734068)
It probably seems fragmented because it's easy to get things confused, and Microsoft isn't making life easy during their journey in open sourcing the whole stack (or at least significant portions of it).

There's the languages (C#, F#), there's the runtime (CLR - Common Language Runtime), and then various frameworks (including the base framework, and the ASP.NET framework). Then there's the difference between the original variants of these and the new 'Core' variants.

Plus there's various other related bits like the .NET Standard projects which are meant for library developers to target to make library cross-platform portability easier.

As for difficulty getting intellisense working via emacs - that's certainly been something demoed, but it's not really a well tested use-case at this time.

If you're coming at it from a non traditional (Windows) developer perspective - then you're looking at a massive ecosystem in flux and in migration from being a primarily single platform to multiplatform.

Re:Span<T> in C# by erikbye on Sunday November 19, 2017 @05:25AM (#15733238)
> ... Coupled with dense and hard to find documentation that seems to be spread out over 14 different msdn domains and GitHub projects.

docs.microsoft.com is steadily improving this.

> I've tried no less than 10 times over the last few months to get "intellisense" working in emacs via roslyn and it has never worked.

https://github.com/OmniSharp/omnisharp-emacs

Are you not using this? Works great for me.

If you want getting started to be less of a chore use VS Code, VS, Rider, VS for Mac, Xamarin Studio, or Monodevelop.

Re:Span<T> in C# by alkonaut on Sunday November 19, 2017 @06:16AM (#15733398)
The fragmentation was really what allowed the new breakneck pace of development. I’m a c# developer full time since 1.0 and I have huge problems following even though I’m 100% on the “old” (desktop) frameworks.

I’m hoping that things will slow down and converge again in a while.

Re:Span<T> in C# by seanmcdirmid on Saturday November 18, 2017 @08:42PM (#15731772)
Don’t forget former Arhus professor Mads Tergesen, he’s been the lead C# designer for sometime now.
Re:Span<T> in C# by styfle on Monday November 20, 2017 @10:52AM (#15740743)
Also TypeScript and Turbo Pascal and Delphi.

> He currently works for Microsoft as the lead architect of C# and core developer on TypeScript.

https://en.wikipedia.org/wiki/Anders_Hejlsberg

Re:Span<T> in C# by pointernil on Sunday November 19, 2017 @10:35AM (#15734285)
Sure. Sharing mostly the same view of this (hi)story... but: did those guys leave? lost their muses? What happened besides maturing and "standards"-lockdown... outside of some smaller bubbles and marketing gigs the whole eco-system seams stagnant and mostly irrelevant to today's internet/web development... despite so obvious interest of the company. What happened? What did not happen? (besides mono and unity)