Should LINQ Be Banned from C#!?

preview_player
Показать описание
This Reddit poster was forbidden from using LINQ in their .NET projects. No LINQ-2-SQL. No LINQ extension methods. No LINQ queries. But why? After more context, there's much more to this story... and none of it's good.

Don't forget to comment, like and subscribe 🚀

💬 JOIN US ON DISCORD

🧑‍💻 LET'S CONNECT ON SOCIAL

#csharp #dotnet
Рекомендации по теме
Комментарии
Автор

That's crazy. I'd definitely start polishing the resume and looking for some place a little less arbitary.

SpiderJack
Автор

I have had some discussions with colleagues about LINQ as I am a bit against it.
It is due to it is harder to read (human readability.), and as I say: "Think of those coming after you, maintaining the code.".
I did some tests asking the others to figure out what simple lines of code did.
The result was that it took people far longer time to understand LINQ than more ordinary ways to program the same.

larsdahl
Автор

Yes. I had static methods restricted due to issues in unit tests. We would actually make an Class that inherits an Interface then use Ninject to inject that class as a dependency where needed.

someidiotwithnoname
Автор

haha wanna give you another one. Listen: "Why we should use anything except static methods? We should not." That was a serious statement from a Team Lead of one company. Heard about it from my ex-colleague. The speech was about PHP, but it does not matter. PHP and C# +/- support the same OOP concepts.

ИванИванов-яэк
Автор

So, where does one get that t-shirt? I want it.

Otto-the-Autopilot
Автор

That is amazing. It sounds like fear dominates productivity and simple good coding practices. There are many people that really think adding unit tests add to the timeline. They're right. It does. Except for when you actually include the support and bug fix time in with the coding time. Then unit tests actually save time!
And you're right that LINQ is an integrated and integral part of the .NET framework. Not allowing LINQ is like not allowing C# devs to use .NET because it's open source.

codewithsean
Автор

Your videos are good but missing some content in background due to overlapping. Make sure on this 🙂

nuthanmurari
Автор

My one nit-pick is when you say "don't use hard coded SQL", you don't say "why". There's no learning for viewers by just saying it's very, very wrong in 2024.

Grumpicles
Автор

Hard coded SQL with a custom ORM? No thanks! This company is too backwards for my liking.

irawsum
Автор

I would ban foreach as well. God gave us for loop to use it and not sin with laziness with some foreach. And vars. var as well is devils idea

socar-pl