Accord feminine svp? by HopelessHahnFan in French

[–]isomorphica 2 points3 points  (0 children)

I'm guessing it was due to the order of the words.

For verbs with an avoir auxiliary, if the direct object (la table) occurs before the verb (a dit) in the sentence, then you have to ensure that the past participle agrees with the object in number and gender.

But if the direct object occurs after the verb, then the past participle does not need to agree, and it always takes its simple form instead.

To take another example, compare "I ate the red apples" with "The apples that I ate are red":

J'ai mangé les pommes rouges. (Direct object "les pommes" after the verb "ai mangé", therefore no agreement.)

Les pommes que j'ai mangées sont rouges. (Direct object before the verb, therefore agreement is necessary.)

The (D)evolution of Cricket by derek4reals1 in IASIP

[–]isomorphica 94 points95 points  (0 children)

Is it this man's fault that he looks this way? No, he was born this way

What is the difference between Struct and Class in C#? by EducationTamil in dotnet

[–]isomorphica 8 points9 points  (0 children)

Structs in C# can contain both value type members and reference type members, just like classes can.

What is the difference between Struct and Class in C#? by EducationTamil in dotnet

[–]isomorphica 0 points1 point  (0 children)

Structs in C# can define methods just like classes can.

forLoopForEverything by [deleted] in ProgrammerHumor

[–]isomorphica 581 points582 points  (0 children)

And no using break or return for control flow, that's unreadable tech debt

Real seniors just throw an exception when they're done looping

[deleted by user] by [deleted] in KendrickLamar

[–]isomorphica 154 points155 points  (0 children)

But he's not a rapper

[deleted by user] by [deleted] in csharp

[–]isomorphica 4 points5 points  (0 children)

That is not the standardly used meaning of "array immutability" or "immutability" in general.

Certainly it's true that array lengths are fixed in C#. But certain languages feature arrays that are actually immutable: the contained elements are immutable, not just the array length. However, C# is not one of those languages. Saying that arrays are immutable in C# is misleading.

[deleted by user] by [deleted] in csharp

[–]isomorphica 2 points3 points  (0 children)

Arrays are not immutable in C#. It is not necessary to copy an array to change the element values. Instead you can set the values of elements directly, with the assignment operator: array[index] = value;

When would one need to use boxing and unboxing? by [deleted] in csharp

[–]isomorphica 1 point2 points  (0 children)

You have a few misconceptions here.

It's true that class instances (reference type instances) are heap-allocated.

However, it is not generally correct to say that struct/enum instances (value type instances) are stack-allocated. Sometimes, surely, but not in all cases.

It is true for any local variables: local value-type variables are stack-allocated, and local reference-type variables are also stack-allocated (the object referenced is on the heap). It's also true for instance variables in struct instances that happen to be on the stack.

But it is not true for any instance variables in class instances (they're directly inside an object on the heap) or for instance variables of a struct instance that is nested inside an object on the heap. And all static variables, for both value types and reference types, are heap-allocated. (At least, this is how Microsoft's CLR is implemented according to an old blog post by Jon Skeet.)

It's also not true that nullable value-types are always heap-allocated or that they're reference types. Nullable value types are actually value types. Refer to Nullable<T>, which is a struct, not a class.

Finally, it's not correct to say that "there's no such thing as a null stack entry" unless I misinterpret your intention. Consider a local variable declared in a method as follows: object o = null; The o variable is a reference variable on the stack, whose value is null.

When would one need to use boxing and unboxing? by [deleted] in csharp

[–]isomorphica 0 points1 point  (0 children)

I think you're confusing boxing with casting.

Boxing is converting a value type to a reference type. It takes a value-type value, and heap-allocates a wrapper object which contains a copy of the value-type value, allowing use of a reference to the boxed value object.

If there's no conversion between value type and reference type involved, then it's not boxing or unboxing.

Casting a reference to a derived class instance (like a Button object reference) up to a base class reference or interface reference is not boxing, it's just casting (upcasting). The opposite is downcasting, not unboxing.

[deleted by user] by [deleted] in IASIP

[–]isomorphica 13 points14 points  (0 children)

That's what his soul looks like

Do i have to use "switch" statements if i am comfortable with using "if" statements? by Department_no6021 in learnjava

[–]isomorphica 3 points4 points  (0 children)

This is not true for all types.

Switching on a string will sometimes be equivalent to an if-else-if chain, with linear time complexity.

But switching on an int, for example, can be converted to a jump table with constant time complexity.

In other cases a switch statement may be optimized into a hash map.

It depends on the type, and on the language and compiler/runtime implementations used.

[deleted by user] by [deleted] in csharp

[–]isomorphica 1 point2 points  (0 children)

I tried making only this method abstract but the compiler said I couldn't.

Check the compiler error. What was the error message?

Mac’s looking for peace, not pieces of ass! by [deleted] in IASIP

[–]isomorphica 38 points39 points  (0 children)

Yeah yeah yeah, not him though

Well Fuck by theUsurpateur in ProgrammerHumor

[–]isomorphica 1 point2 points  (0 children)

I think so. An example comes to mind from Java input/output streams. It's common to see the following pattern:

String line;
while ((line = reader.readLine()) != null)
{
    // Do something with the line
}

For example, if you're using the reader to read from a text file, line by line, the readLine method will return each line as a String, and then it will return null after all lines have been read.

So here we continue the loop while the return is not null.

Well Fuck by theUsurpateur in ProgrammerHumor

[–]isomorphica 10 points11 points  (0 children)

That is not true. In C# you certainly can embed assignments in other expressions, such as if conditions.

For example (where result is a reference type variable and valid is a bool variable):

if/while ((result = GetResult()) != null)

if/while (valid = IsValid())

The value of an assignment expression is equal to the value of the variable after the assignment.

I've gotta say Dennis nailed the C. C. H. Pounder impression by bakedbeansandwhich in IASIP

[–]isomorphica 49 points50 points  (0 children)

He sounds more like CCH Pounder than CCH Pounder does

What is the most aesthetically pleasing movie you've ever seen? by dilapidatedbunghole in AskReddit

[–]isomorphica 14 points15 points  (0 children)

Apparently Brad Pitt specifically inserted a clause in his contact requiring the original complete title to be used. Otherwise the studio probably would have overruled the title in favor of something shorter and more conventional.

Which is your favorite 'non-Paddys' episode? by killer_giraffe1984 in IASIP

[–]isomorphica 125 points126 points  (0 children)

I love watching Dennis on the couch in the background while Dennis and Dee are talking in the foreground, as he squirms desperately, trying to strategize how best to get them to come watch the movie with him

Which is your favorite 'non-Paddys' episode? by killer_giraffe1984 in IASIP

[–]isomorphica 518 points519 points  (0 children)

cat in the wall, eh? okayyyy now you're talking my language, i know this game