transform.localPosition.x=0; ?

I thought the new version of c# allowed such thing.
what’s the new syntax to do that ?

and .Set(x,y,z) doesn’t seem to work as localPosition.Set(

It was never allowed to do transform.localPosition.x = 0;
Nothing has changed about it in 2019.3 Beta

I guess this is what you want:
transform.localPosition.Set(0, transform.localPosition.y, transform.localPosition.z);

There is no C# feature that allows such thing both old and new.

Methods that return a value would always return a copy of that value, unless you explicitly tell them to do a “ref return”. If the “ref return” is what you thought of, I’m afraid there won’t be any chance for it to be realized. Because to make a method or property returns by ref, you would need to modify its declaration and implementation, that means the scripting team must rework a huge number of properties. And once they are made to do ref return, other things would break. The risk is too severe and the breaking change is so huge, they would likely never do that.

you tried it?

this Set doesn’t change local transformation though, perhaps it’s after a parenting, don’t know and looking at the disassembled code of Set it should work

This part of the call “transform.localPosition” returns a copy of localPosition, and this part “.Set(…)” operates on that copy. So basically you were not doing any change to the real/original value of localPosition. Because the nature of value types is unchanged in the newer version of C#, you still need to set the property manually:
transform.localPosition = newValue

The Set() method is a member of Vector3, not Transform.

That’s right @Laicasaane , my bad, the correct way would be:
transform.localPosition = new Vector3(0, transform.localPosition.y, transform.localPosition.z);

gotcha @Laicasaane I didn’t know localposition wasn’t a reference … fuck this API it’s so opaque
@mikelortega that’s what i ended up doing

Opaque? I don’t agree with you. It’s apparent that localPosition returns a Vector3, and Vector3 is a struct, so there is no reference in the first place. For “ref return” APIs, their declaration is different, for example,
public ref Vector3 localPosition { get; set; }

So by reading the API declaration you would know immediately if some APIs let you working on the original value or a copy.

In the IDE, such as Visual Studio, I usually make structs and classes separated by using different colors. It improves the code’s readability a lot.