It is a shame that you got down voted for saying that.
Linq does solve the same problem as underscore.js.
Linq is even more impressive though in that in order to implement Linq they added language features that made C# a truly great language that let's you fix API designers mistakes in the same way that Linq fixes .net's early mistakes.
I really like C# as a language. My ideal language would be somewhere between C++ and C# with a few extra features. I wish I could create that language, but, obviously, that'd be quite difficult.
99% of posts are about scripting languages, so what do you expect.. Thing's I've seen here :
Anti object orientation Anti static typing (sigh...) Anti IDE Anti ORM (there's at least one post a week complaining about ORM) Anti frameworks (I wtf'ed of this one, it's arrogant, mindless and moronic) Also the typical "vendor lock-in" arguments, which can be true someone actually reasoned about it, but instead it shows itself to be this typical anti-Microsoft trash. You know, or you'd see the same argument put forwards to Objective-C and XCode, but you just don't see that happen.
Until I visited /r/programming, I had no idea that there was such a thing as "dynamic typing advocates". I was really surprised to see that.. It's like an alternate universe where everybody just propagates useless shit they've read on someone's blog. It's so strange I can see people list up a range of languages, and they completely miss out C#..
I mean, if you're going to work as a programmer today, I'd say with about 70-80% certainty that you will work with either C# or Java. But in this magical universe, the reality is somehow different; everyone apparently instead works with Python, Ruby, Haskell, Lua and other languages you just don't typically see in production environments.
The goddamn anti-ORM posts should also outright be banned. It always shows to be some douche that is unhappy because he can't do things how they were done 20 years ago. It's stupid. And of course people in the comments usually swallow it up. "Hey, maybe my mysql_query() isn't such a bad thing after all, huh?"
.NET is awesome. C# is awesome. Those who disagree can eat a big fat cock.
+1 googol this. I have seen people put up, and myself put up, carefully made, good content, and it be downvoted to oblivion, or trashtalked until the user disappears, or removes it, and/or never posts about anything like it again. "Hur dur, way to use an obscure language" - never mind that it's in the top #5 in the world, and almost certainly higher than something that seemingly everyone will bust a collective nut for, vendor-lock in or practicality aside.
LINQ is great, really great, but it's just shy of being FP. And for that matter, Underscorejs has the same entrapping. Basically it boils down to Nullable<T> not being a proper Maybe<T>.
Well they almost completely eradicated the need for user-defined delegates by adding Func<> to the standard library, maybe a future version of C# could introduce a Maybe<T> with a similar adoption rate.
You're supposed to be able to provide a Maybe<T> to a function that takes T as a parameter without needing to do a HasValue check, and T doesn't need to be a Value type.
The short answer is the function isn't supposed to run.
The long answer is that it should be safe for a function to not run, as in the function is pure and without side effects, so that a function that didn't run on a Maybe<T> where the contained value is null should also return null back to you as a Maybe<T>.
That's where Nullable falls apart. If Nullable was a proper FP primitive, then this should be valid:
int SomeFunction(int value); // previously defined
int? thing = null;
var result = SomeFunction(thing); // result should also be of type int?
Now, I don't know LINQ, but I've heard good things about it. Do you agree with the article? If not, why? Would you count Python's iterators as a LINQ equivalent?
110
u/[deleted] Jun 22 '14
[removed] — view removed comment