5 ms·
Hate Microsoft much? You’re not selling anything to Microsoft. You sound like you just stepped out of the 90s. As for the misinformation about writing 5-10 tim
by GiorgioG 5y ago
Hate Microsoft much? You’re not selling anything to Microsoft. You sound like you just stepped out of the 90s.
As for the misinformation about writing 5-10 times more code than other popular languages, which languages would that be?
- EVa5I7bHFq9mnYK 5y agoThe language that was originally created for one-line scripts in the browser.
- kaba0 5y agoIt’s bullshit. There is not even a 2x factor between high level languages when it comes to productivity (and lines of code is a shitty metric to begin with. Typing speed is most definitely not the bottleneck for programmers)
- bayesian_horse 5y agoI did not speak about productivity or typing speed. Readability and reading speed is a factor affected by lines of code. Switching between files when every class is in its own file and you need to touch half a dozen classes for each API endpoint, is more of a factor...
- c0nfused 5y agoTo be pedantic, It is entirely possible in .net to have either multiple classes per file or multiple files per class.this has been in since least .net 2 Pardon my formatting I'm on a phone Namespace foo{ Class class1{} Class class2{} } And Partial class foo{ }
- metaltyphoon 5y agoDo you understand that this is a choice made by someone instead of a requirement?
- mtone 5y agoIt's not just idiomatic but pretty much standard in C# to have a single file per class so it's a fair criticism.
- metaltyphoon 5y agoNo it's not "idiomatic". Stop this nonsense. Look at the biggest C# code base, ASP.NET Core, and there are many instances where this is not the case. You don't need to preface a method with `private` to be so but people still do it, why? My theory is the influx of Java dev influences, same with the "One class per file nonsense".
- bayesian_horse 5y agoWhere I work it is a hard convention. It is also a sensible convention because anything else makes the codebase even harder to navigate/refactor and whatever. When working in teams, you really shouldn't put more than one class in one file, except for rare exceptions of very small and inconsequential classes. Otherwise the files get pretty big and the chance of merge conflicts get bigger. The underlying problem - in my opinion - is that C# encourages you to overcomplicate things and that it is relatively verbose. Of course you can put a class with multiple members and methods in one line. But then it's also unreadable. Readability matters. All languages with a syntax derived from C have a fundamental readability/verbosity problem, C# is no exception. F# for example doesn't have that baggage and is a lot more concise.
- bayesian_horse 5y agoIt is a convention, but not entirely without reason. Breaking the convention leads to other problems. You still need a metric shit ton of classes, so finding any one class gets harder. The chance of merge conflicts increases because of more lines per file.
- bayesian_horse 5y agoI don't hate Microsoft. You just need to be clear that if you build something with the .NET ecosystem, you are fully dependent on that company, even if some people want to suggest otherwise. And this seems to bite people occasionally.
- GiorgioG 5y agoYou keep making these false statements. .NET is open source. You're not dependent on Microsoft at all if you don't want to be. If Microsoft closes shop tomorrow, .NET will live on. You've got a minimal amount of .NET experience (based on your own assertion 3 months ago) and you're spouting incorrect/false information. You were forced to use .NET, maybe that's why you're so unhappy with it. I've used C#/Java/Go/Python/Typescript/JS in my professional life and I've never felt more productive than when I'm building software with C#/.NET. Is it perfect? Not by a longshot. If I had my way I'd be using F#, but alas it's not popular/well-promoted (that I blame squarely on MS.) https://news.ycombinator.com/threads?next=29303588&id=bayesian_horse#29225976 https://news.ycombinator.com/threads?next=29303588&id=bayesi...
- bayesian_horse 5y agoIf you think .NET will continue without Microsoft, you are delusional. It won't "die" as in the codebase disappearing, and there would even be the occasional patch, but the project and platform as such would essentially be dead in the water. You are also beholden to the direction Microsoft wants to take the project/platform. There is nothing the other open source contributors, such as there are, can do about it. Fork? Maybe, but there's not THAT much activity around it anyway. Again, all of this is a risk or "situation" one may be happy to take. Just be aware of it. At the end, .NET is more code, harder to learn, harder to recruit for, easier to over-complicate, and the ecosystem of libraries is thinner than with Django, Python and Javascript.