Viktor Sirotin
01/28/2023, 4:17 PMaltavir
01/28/2023, 5:51 PMViktor Sirotin
01/28/2023, 5:58 PMaltavir
01/28/2023, 6:01 PMNumber.m
, but inside specific scope like context(TypeSafeUnitsScope) Number.m
. You can do it without context receivers by creating member extensions for the object or class, but it will limit extensibility. because you will have to extend class to add new units. Context receivers solve this problem.Viktor Sirotin
01/28/2023, 6:30 PM