Hacker Newsnew | past | comments | ask | show | jobs | submit | zija's commentslogin

I don't understand why the dotnet team doesn't invest more resources and time into tools: doctests and documentation generation, better and faster unit tests that I can write next to the actual code, easy access to the source code, no need to decompile a Dll to see it after pressing F12, a central place for packages and documentation like in pkg.go.dev or docs.rs . Most packages in nuget have no documentation at all, or only in readme format on GitHub, or a short Wiki on this page. Other environments like Rust, Golang, Java, Python are light years ahead when it comes to these aspects.


A part of me jokes that Micro$oft only invested in OpenAI because it's the only sensible way to browse .NET/Nuget package(s) documentation. The other part knows it's dreadfully true.


Small F# community have https://fsprojects.github.io/FSharp.Formatting/ that is a lot better than docfx, it has markdown support, notebook suport, script output embedding.

C# has nothing like that, xml comments and raw documentation that has no value


In all their docs they now have links directly to the source for the method you are looking at, for example https://learn.microsoft.com/en-us/dotnet/api/system.string.s...

As for source for nuget packages, it's easy to enable source link to make that happen too, it's just that this is all pretty new so not every package is doing it.


I agree with you, but I think this is most likely due to how relatively new open source C# is. I'd hazard that most C# being written is still done by enterprises/companies as closed source. I feel this will improve over time, as long as Microsoft continues down the road of being open, and doesn't pull back what they've been doing in the last few recent years.

Some of these features are provided by tools like Resharper, and I wonder if there isn't some kind of agreement (whether written or unspoken) where they don't step on each other's toes. To be honest, most documentation I have seen written in C# projects still makes me reach for the source code due to poor quality. Having lots of autocompleted tooling doesn't help when it comes to reading, only writing, in my experience.


Very true! My first non-work opensource C# project is from 2020 and that seemed strange at the time

https://github.com/unfrl/dug


This is awesome, because most CLI tools for this don't seem to work anymore (at least in my experience). I need to talk to my employer, but I'd like to open source some work I've done for generating static redirects/rewrites in IIS format (still able to be used by open source .NET), as well as a tool that will take those redirects and visit the original URL, then check that a 301 redirect occurred, with the Location header set to the appropriate new URL. I work with a digital marketing agency, and we do a lot of SEO work, including making sure old URLs match up with new URLs. I got pulled into the creation of 301 redirects, so built tooling to take care of it for me.


Sandcastle Helper File Builder has been around forever and started as an internal MS project IIRC, but for some reason few libraries use it.

https://github.com/EWSoftware/SHFB


I used to use this quite a bit after it was introduced, but CHM files are a bit unwieldy for documentation, at least for myself. Having integrated search is nice, but the windowed interface, and being tied to Windows (AFAIK, maybe there are readers for other operating systems) I believe will keep this project from being used. I always found it to be decent for more advanced developers, but felt there was something missing for more junior developers that needed documentation.


I haven't used it in 4-5 years but at the time we were generating html docs with it. IIRC it supports several other output formats.


Here’s a way to write tests next to the code: https://clipperhouse.com/go-test-csharp/

(Whether I recommend it, not sure! I did it and then undid it, with suspicion that tests were taking longer due to, perhaps, worse caching of build artifacts.)


They are working on servo implementation, but it's long time to go.

Tauri has problem on Linux, webkit2gtk has lower performance etc. I know I have problems with three.js, others with svg

Additionaly communication speed between backend and frontend is bottleneck (serialisation to string) and you must use custom protocols to effectively communicate/send large data, zero copy binary protocol isn't possible at the moment


I've been looking into Tauri and I'm curious if you could expand on the known problems with three.js and svg? Thanks.


C# team began experimenting with green threads: https://twitter.com/davidfowl/status/1532880744732758018?t=P...


Well that is very cool!


I don't know what to think about it. Half-baked idea: use free functions only in one file in project is meh..

Modern Kotlin, Scala, F# can and use free functions and reduce boilerplates to minimum. C# developers wants attract newbies, juniors, fans of J's, python etc and simultaneously don't disturb old users, fans of c#/java and enterprise development.

"It's only for quick scripts, prototyping, for teaching". Choose a side, don't pretend that you are modern and cool.

Modern c# is fine, but some features are only sugar, and yet i still waiting for proper sum types with exhausting pattern matching. Slow progressing java have this in 17 version..


The real reason is to attract and onboard people onto the platform. Part of me always felt they should of just put a functional wrapper on their APIs, have an API that avoids the mutative fluent interface, and then just show some F# examples. Especially for people outside the .NET ecosystem it would show how terse, yet performant and feature rich the platform actually is. It would compare well to examples from other langs/ecosystems.

In the workplaces I've been in newer developers typically try then abandon the OO paradigm. They've seen they can get by without it and get decent performance, and there is a learning curve which experienced people have already paid for and typically then take for granted (patterns, DI, class structure, interfaces vs abstract classes, etc etc etc).


From top popular language, say from https://redmonk.com/sogrady/2021/08/05/language-rankings-6-2..., only Go and Swift/ Objective-C are languages with static typing, compiled to native tool chain . And Swift are very apple centric.

This have huge impact for go popularity. Alternative to Go: - java and JVM language are heavy gorilla languages that's need more resources/ no value types. graal native is not straightforward alternative. - C# is good alternative, but again jitted, and there are no alternative for Microsoft products in open source community,people choose go as default alternative to java few years ago..


I think you're discounting how much having Google backing you adds to popularity. D has static typing, compiles to native, works on every major platform, and has been around far longer, but doesn't have near the adoption of Go.


Same case for Nim, I really enjoy working with it.


Or Pascal. Wirth's most popular languages

It has a unique combination of features that I cannot find in any other languages

Unfortunately there is a disturbing lack of quality libraries. I have to write everything myself. Really everything. A few days ago I wrote my own string to int conversion.


Having actually tried using D, it has far more warts than Go.


.NET has had AOT support since its origin, although it only supports dynamic linking.

https://docs.microsoft.com/en-us/dotnet/framework/tools/ngen...

Since Windows 8, .NET Native is also a thing, and then there are the other AOT toolchains like Xamarin and IL2CPP.

AOT compilation has been part of Java world for those willing to pay for commercial JDKs, specially in the embedded domains.

In fact, the JIT caches with PGO optimization now available for free on Hotspot and OpenJ9, come from JRockit and IBM J9 respectively.


Did you forget about C++ and Rust?


No, i like Rust very much. But Rust require from me to deep dive with language, it's not productive language, it's correct from start to end language. Language with optional GC, value types like Nim or D are better for small hobby projects. But community and library ecosystem and tooling are weak. On other hand there are Ocaml and F#. But Ocaml for windows is weak, community is small etc F# inherits problems from c#


OK, but this:

> From top popular language, say from https://redmonk.com/sogrady/2021/08/05/language-rankings-6-2..., only Go and Swift/ Objective-C are languages with static typing, compiled to native tool chain

is still false.


That's a fair point, but I don't find Rust really harder to use than Go for small hobby projects. Swift is nice as a language but has a huge lack of libraries.


Few gripes with c# (as a hobby developer):

-no sum types, Java 17, kotlin, scala, f#, typescript, rust, Swift, nim, ocaml etc all can modeling types better than C# - no option, no result, exceptions are invisible for caller (ex. Tracking effects in nim)

-NRT doesn't resolve all problems, "required" is better, but I don't know if c# 10 will get it

- no let/val like kotlin, scala, rust. only readonly

- no expression based like kotlin/scala (or required initialization like in rust)

- no exhausting pattern matching

- most community are consumers of Microsoft libraries. Want small rest API framework? use asp.net core, want full stack? Use asp.net core. No other framework, even for rails is Sinatra.

- i would like to see better documentation frameworks with top level comments, doc tests, runnable examples like in rust, nim, d, and unit framework like in d or rust.

- no free functions, top level for only one file in project is too restrictive.

- no easy repl based work ( or community accepted)

From my newbie perspective c# is still good for few things, enormous resources for everything, only java from 'application' languages have more, generics, records, value types etc


Why not use F# then? While being less flexible than OCaml, it is still a huge level up from C# while retaining the ability to use the same libraries.


Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: