Re: .NET 7 is Available Today
От: vaa  
Дата: 09.11.22 14:12
Оценка: 9 (1)
Здравствуйте, Serginio1, Вы писали:

S>.NET 7 is Available Today


Костылей все больше и больше:

Given the following C# data type:

public sealed class Person
{
public int Id { get; init; }
public int Name { get; set; }
public int Surname { get; set; }
public Person Set() => this;
}

Before, in F# 6, the following code would’ve compiled and mutated the property Id of the Person:

let person = Person(Id = 42, Name = "John", Surname = "Doe")
person.Id <- 123
person.set_Id(123)
person.Set(Id=123)

по AOT для F# "еще работают". Видать слишком много метапрограммистской магии.
☭ ✊ В мире нет ничего, кроме движущейся материи.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.