Show newer

re: c++ 

@Lady in C++ all literals are rvalues except for string literals. for Some Reason.

c++ 

It's annoying how arbitrary the rules for value categories are.

  • casting a value as an rvalue reference is an xvalue since it is an addressable result available to the programmer but the result is also temporary. Ok.
  • then casting something as an lvalue reference should be the same, right? Wrong. It is an lvalue because the standard says it is. Ok.

  • temporary values, even if they have an address, are still rvalues even if the address is not made available to the programmer (this most often occurs when you return an object from a function call). okay, fine.

  • but string literals are lvalues??? & is defined on a string literal? why? why only for string literals and not all objects??????

  • accessing an element of an array from an expression for an array that is, itself an rvalue (ie, get_array()[0]) is an xvalue, not a prvalue. I guess, by definition, arrays elements are inherently addressable data available to me so sure, why not.

  • but get_object().property is also an xvalue. why. why is it an xvalue. even though objects have addresses they are not exposed to the user if they are temporary so why is the property access now considered addressable??????

I truly don't think it's possible to derive in the general case whether something is a prvalue, xvalue, or lvalue from first principles. For a lot of cases you just have to see what the standard says they are and try to make sense of it.

Maybe if I understood more about compilers there could be good reasons for these value categories but then again, if the language can only be properly understood by understanding implementation details of its compiler then it is not an effective programming language imo.

@Satsuma @aescling @Lady I think Rika is aesthetically beautiful but I don't think she's my type

@aescling @Lady see if I can't turn back and I lose my consciousness that is no meaningfully different from dying. But if I keep my consciousness and permanently tf and I probably would rather die

So what I would do on whether there are ground type pokemon that are like Mewtwo in the sense that they can think and hold conversations and whether or not this is permanent

@aescling am I stuck this way forever or am I doing it for fun?

@aescling do I keep my consciousness completely intact or do I acquire the mental capacity of whatever pokemon I am turned into?

@Lady @Satsuma somehow only just noticed this comment thank you for sharing this weird ass idea

in a cruel twist of fate, the day after posting about the indomitable work lip gloss, i come in this morning and it has been removed.

this is the first time I have ever mentioned it to anyone. it was a Game, and i lost.

Show older
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.