"Yannick Duch�ne (Hibou57)" wrote in message news:op.vcctpljtxmjfy8@garhos... ... > If I do : > > R := (A => R.A, B => 5); > > what is the most likely expected impact on the executable code efficiency, > providing this kind of construct oftenly appears in multiple places of the > source ? (the record type is obviously private and just accessed in the > implementation). > > Do you think most compilers will use the presence of an R's self component > as an hint for some kind of optimization when applicable ? I can't speak for "most compilers", but Janus/Ada does this optimization (it will just assign R.B). The Janus/Ada compiler is full of aggregates like this, where "B" is a discriminant of the record. The only legal way to change the discriminant is a full record aggregate, and thus we have a lot of similar aggregates (our original compiler didn't enforce the not assigning of a discriminant, and the source got infested by such changes). Therefore, we have special-cased this assignment. Randy.