Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Building Tuple

Name: Anonymous 2009-10-04 18:21

http://msdn.microsoft.com/en-us/magazine/dd942829.aspx

They're proud of it, damn it! It just wouldn't feel right to walk up to him and tell him that this would be trivial if their poor excuse for metaprogramming by way of generics didn't suck balls (``we didn't feel the time we would spend adding eight more tuple types would be worth it'', WTF?!1), and that anyone using tuples are damn well gonna compare them either structurally or not at all. It would be like kicking a puppy.

And what's with the ads? Are MS so poor they have to scrounge for small change in their developer resources now?

Name: Anonymous 2009-10-04 18:45

Tuples are great.
C# is great.

Sounds good to me.

Name: Anonymous 2009-10-04 18:56

At least it's not mutable.

The whole reference/structural equality thing in .NET sucks anyway, this just adds to it.

we were unable to find compelling reasons for Tuple to implement interfaces like IEquatable<T> and IComparable<T>
"Instead of fixing .NET so that implementing interfaces that aren't used doesn't add overhead, we'll just not implement those interfaces." Great.

Also, the code in the article was invisible in Firefucks. MSDN quality.

Name: Anonymous 2009-10-04 19:13

>>3
"Instead of fixing .NET so that implementing interfaces that aren't used doesn't add overhead, we'll just not implement those interfaces." Great.

I don't think you understand how it works.  There is going to be overhead somewhere if you implement stuff that isn't used.  Also, it showed up fine in my Firefox.  I think IHBT.

Name: Anonymous 2009-10-04 19:52

>>4
I don't think you understand how it works.  There is going to be overhead somewhere if you implement stuff that isn't used.
Um, bullshit? Tell me, in C++, where is the overhead if you don't use operator< in std::pair?

Name: Anonymous 2009-10-04 20:08

>>5
IHBTH

Name: Anonymous 2009-10-05 8:24

>>5
.NET generics are different from C++ templates. One difference is that operator< in std::pair is not a part of any interface or anything, also there is no reflection, so the compiler knows all places where it's used and doesn't compile anything if it's not used anywhere. In .NET you can create a generic tuple, cast it to an `Object`, give to some other assembly that was just loaded, and it should be able to cast it to `IEquatable` or see all methods through reflection. As a consequence, when JIT or ngen (not a C# compiler!) instantiates a generic class, it should compile the code for each and every method present, to yield a completely defined regular class. These guys decided that the overhead was significant enough.

Name: Anonymous 2009-10-05 8:29

It makes me rage when languages don't support tuples.

Name: Anonymous 2009-10-05 8:33

It makes me rage when languages do support tuples.

Name: Anonymous 2009-10-05 9:11

Immutable tuples make me rage.

Name: Anonymous 2010-11-15 7:50

Name: Anonymous 2010-12-17 1:34

Erika once told me that Xarn is a bad boyfriend

Name: Anonymous 2011-02-04 18:31

Don't change these.
Name: Email:
Entire Thread Thread List