AdaCore / ada-spark-rfcs

Platform to submit RFCs for the Ada & SPARK languages
62 stars 28 forks source link

[RFC] Max_Size aspect for tagged types #94

Closed raph-amiard closed 1 year ago

raph-amiard commented 1 year ago

Link to text: https://github.com/AdaCore/ada-spark-rfcs/blob/topic/max_size/considered/rfc-class-size.md

mosteo commented 1 year ago

I can see myself easily abusing this one to have definite classwide objects, just like tagged is sometimes used just to get dot notation. Maybe because I do think that Ada would greatly benefit from having a native way to use indefinites as definites, beyond the clunkly Indefinite_Holders.

I guess my kind-of-a-point is that this proposal seems very specific but the interest on what it does may be of a wider scope.

raph-amiard commented 1 year ago

@mosteo

I can see myself easily abusing this one to have definite classwide objects, just like tagged is sometimes used just to get dot notation. Maybe because I do think that Ada would greatly benefit from having a native way to use indefinites as definites, beyond the clunkly Indefinite_Holders.

I guess my kind-of-a-point is that this proposal seems very specific but the interest on what it does may be of a wider scope.

You're correct. This proposal is intended to be one of a bunch that will allow constrained versions of types that were necessarily unconstrained so far (see https://github.com/AdaCore/ada-spark-rfcs/pull/97 for another example)