The Set class now implements the Iterable interface, so you can directly iterate over sets. Both sets and lists are iterable, allowing for more code reuse.
Where: This change applies to Lightning Experience and Salesforce Classic in Enterprise, Performance, Unlimited, and Developer editions. This change is a versioned change in API version 58.0 and later.
Enhancement
Replace String.join(new List<String>(SET), ', '); to String.join(SET ', ');
Use Iterable<Id> instead of separated methods for Set and List e.g byIds(Iterable<Id> recordIds)
ETA
Summer 23' will be available in production: 10th of June 2023
The Set class now implements the Iterable interface, so you can directly iterate over sets. Both sets and lists are iterable, allowing for more code reuse.
Where: This change applies to Lightning Experience and Salesforce Classic in Enterprise, Performance, Unlimited, and Developer editions. This change is a versioned change in API version 58.0 and later.
Enhancement
String.join(new List<String>(SET), ', ');
toString.join(SET ', ');
Iterable<Id>
instead of separated methods for Set and List e.gbyIds(Iterable<Id> recordIds)
ETA Summer 23' will be available in production: 10th of June 2023
Resources