Is there a way to restrict the type of a parameter to value types only
(struct)? I know of Any and AnyObject, but I'm missing AnyValue.

How can I achieve something like the following, to make sure that the
parameter is immutable and has copy-on-write feature?

protocol Actor: class {
    func send(message: AnyValue)
}

I'm curious why AnyValue is missing. Can someone answer this?

Thanks in advance.

-- 
Board of Directors: Andrew Pinnington, Alistair McCann, Jonas Gumny
Commercial Register: HRB 110377

The information and attached file(s) (if any) contained in this email is 
confidential and may be legally privileged. It is intended solely for the 
addressee. Any access to this email by persons other than the addressee is 
prohibited. If you are not the addressee for whom this email is intended, 
you may not disclose, copy, distribute or store this email. If you receive 
this in error, please delete and email confirmation to the sender. Thank 
you for your cooperation.
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to