135 points · by binarynate · 4y ago · 138 comments
The go-to deep dive on how DOTS/Burst works is pretty much everything Jackson Dunstan has ever written on the matter [2] but specifically the article that digs into how IL2CPP calls Burst is interesting.[3]
[1] - https://docs.unity3d.com/Packages/com.unity.entities@0.17/ma...
Hopefully it will change for c#, MS needs something for startups / enterprise / new dev to excite them to choose .net core! (despite all the bad things in the past)
Our customers love the experience too. We switched to SQLite for persistence, so there are literally zero prereqs to an install now.
Outside Windows you only get a subset of the ecosystem, so you always have to watch out for libraries that have been written or ported to .NET Core explicitly, as a large majority of them might work on .NET Core on Windows, but fail everywhere else due to what they are using from Windows/COM.
Additionally there are 15 years of .NET Framework ecosystem that can't be easily migrated to .NET Core due to breaking changes.
Java doesn't suffer from this problem.
What libraries are you referring to, because outside of niche things like WCF there's very little left that doesn't run on every OS .NET 6 runs on now. Of course COM won't run on Linux.
Niche stuff like enterprise in-house build built 2002 and 2015 when Windows was the only game in town (mono wasn't really taken seriously), enterprise CMS like Sitecore and SharePoint, GUI frameworks (component libraries from DevExpress, ComponentOne, Telerik among others).
And all the stuff Visual Studio Professional/Ultimate have on the box and Rider will never support, nor VSMac/VSCode.
I'd have to develop my own tooling, first.
Yes, the old (pre-.NET Core), .csproj files were a mess, but the post-2017 .csproj/.props/.targets files are a pleasure to work with.
Yeah. Much better. Until you try to run it from a network share. Or your quad core laptop "Intel inside " goes in thermal throttling because .NET is "optimizing".
I haven't seen something like that, my laptop is AMD though? (I write .net code) Unsure how much of a difference that makes.
I like .Net, it's not without it's issues, I think the same is true with Java, having been the administrator for some Java servers in the past, I've seen plenty of Java issues that seemed crazy ~ but I think we're talking about how great things are now, maybe, while saying it doesn't matter because how bad the legacy tech is?
Without this step it can still run but being interpreted it runs slower.
I remember using 'WebBroker' in Delphi 5 and running it on Apache on Windows for a startup back in the day, it really was the best web framework I've ever used and I've used literally a dozen.
That just indicates they did the most important and useful stuff first.
I still remember how going from 1.1 to 2.0 was such a massive improvement.
At some point making it more versatile actually makes it a lot harder to newcomers to learn, especially because all the old articles, code snippets, stack overflow posts etc. stay there and tell you the old (and sometimes now wrong) way to do things.
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csh...
Meanwhile 2 and 3 were giant, holy shit.
I’d like to see more powerful generics, so that something akin to partial template specialisation is possible without going through boxing and unboxing too much.
With regards to safety, well rust has shown what is possible. Async/ await has introduced function colouring which is a kind of bloat.
All in all there are many things that could reduce the bloat, instead of some tiny features that help with value types or to optimise some rare case.
I do wonder how much effort it'd require
The only thing is you don't get exhaustive type checking, now depending on how passionate you are, that can be a must have, but I actually don't mind without.
One of the big lacking things for me is the lack of being able to make types from basic types, sort of like a typedef in C++. F# allows you to do it, but it actually fakes it as .NET itself has no concept of this. This is a PITA if you want types for things like CustomerId which is just an int, but you want it such that CustomerId is typed and can't be passed to other places that would take an int, only if places that take that type. You can model it with a record, but it becomes a bit unnatural and makes mapping it to datastores more effort.
There's a few more things I think they could steal from F#
- a way to do pipe operators - Type providers like https://fsprojects.github.io/FSharp.Data/ - computation expressions (monads without the drama)
To be honest I think each language should play to their strengths and only "steal" things that benefit their current market of users and how they work. If it augments them that's fine. Otherwise you risk cluttering the language with too many ways to do things. If you want all these F# features you probably just want F# - its not too hard to call `dotnet new classlib -lang F#` these days and mix both in together in a solution.
Having worked in a few C++ shops, at least from my experience, it can result in a lot of useless debates and internal wars if you keep on adding different features from different paradigms into the language whilst trying to keep backwards compatibility.
My view is that if you want unions/non-nullability/data vs classes even if C# gives you the features, it feels more natural to code that way in F# due to the environment around the features and years of optimising that code path. It's just less noisy and less workaround'y. i.e. each language typically prioritizes enhancements and features based on what users in that language are having pain points on. In that sense F# is much further on the data/function paradigm than C# is - conversely when doing low level stuff C# is often in front having to cater for that for some time.
https://dotnet.microsoft.com/en-us/apps/games/ecosystem
But the problem is the WinDev silo, they are pretty much against anything not C++/COM.
XNA died because when Phil Spencer left, no one else cared and naturally XNA got rewritten in C++ as DirectXTK.
Genuinely curious: aren't Python decorators basically the same as C# annotations, and aren't context managers covering the same ground as a C# using statement?
Anders very much creates 'pragmatic industry languages' that optimize for the broader use rather than the individual use. An important part of this is ability for various developers to work on each other's code bases, relatively efficiently.
The contrast to this is a Clojure where you can end up creating basically a DSL that's optimized to the problem space, but that language is then unique to the application and with a higher learning curve when a new developer has to pick it up.
In one of his interviews Anders specifically said he doesn't like AOP because it allows the creation of 'magic' that is hard to understand for other developers. And that's very true at the margins - sure the standard use cases of e.g. logging are not so hard to grok, but it's possibly to weave together incredibly complex/hard to understand/hard to reverse engineer/easy to misunderstand systems when AOP is used heavily or exotically.
So it makes perfect sense when considering he is optimising for an 'industry language' not a 'superstar whose code is hard to average developers to work with' language, that AOP is not in the core language, especially considering extensions such as PostSharp are available.
like @Transactional?
If yes, then I'd really do not want those "magic-like, tricky when it comes to debugging" features
Even more so when you look at stuff like WinForms - someone coming from VCL would see many familiar things.
Sounds like you never used Delphi. Modern C sharp with whatever MS calls the GUI classes this week doesn't hold a candle to how fast you chouls whip up an UI in Delphi and then concentrate on actual functions.
Edit: talking about the Delphi before Microsoft offered Hejlsberg 1 million extra per year and Borland refused to match...
https://podcasts.apple.com/us/podcast/twenty-years-of-c-with...
Not the best website user experience but it's a great podcast, even if you're not interested in .NET. Highly recommend all their Geek Out episodes.
Wish it was more used around.