Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

74
Vistas
Swift 4.2 - __shared attribute near type

https://developer.apple.com/documentation/swift/double?changes=latest_minor In updated version of class definition I found init method for Double with NSNumber near type the unknown keyword __shared. What does it mean?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

The __shared parameter annotation means that a value type parameter can be passed by reference.

For value types, this enables us to elide a copy before we make the call and instead pass a reference pointing right at the memory we allocated. SIL calls this convention in_guaranteed for (indirect reference with guaranteed lifetime). It's currently the way we pass self in non-mutating functions.

It was introduced by the Ownership Manifesto.

Here is the difference between the ownership annotations:

  • inout: mutating pointer-like value
  • __shared: non-mutating pointer-like value
  • __owned: an explicit way of writing the default

Here is a summary of the manifesto: Swift Ownership Manifesto TL;DR.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda