when instantiating an SObject type, I can set initial field values by passing them to the constructor. For example like this:
Account a = new Account(name = 'Acme', billingcity = 'San Francisco');
I'm wondering what exactly, in terms of Apex language primitives, is
name = 'Acme', billingcity = 'San Francisco' in that example. In other words, what is SObject's constructor method signature? The docs are not very helpful on this topic.
Staring at the example above, knowing that
variable = expression is a common syntax for assignment and that assignments often return the assigned value, my initial guess would be that - in this case - the constructor receives two String arguments, 'Acme' and 'San Francisco'. However, that is obviously not the case.
Semantically the argument(s) also resemble a Map literal, but the syntax does not match. Closer, but still no cigar.
To put my question in practical context, try building the constructor argument(s) dynamically, eg. from an arbitrary Map.