xdpw icon indicating copy to clipboard operation
xdpw copied to clipboard

Implement RTTI and the CASE statement over types

Open vtereshkov opened this issue 5 years ago • 0 comments

Comparing to Go, the current implementation of interfaces in XD Pascal is limited, since it lacks 'type assertions' and 'type switches' (i.e., the case statement over types, in Pascal terms). This omission, for example, makes empty interfaces meaningless, while they are widely used in Go, even for implementing Println.

Type switches require run-time type information (RTTI).

vtereshkov avatar Feb 28 '20 17:02 vtereshkov