Discussion Thread: DIP 1035-- at system Variables--Community Review Round 2
Paulo Pinto
pjmlp at progtools.org
Wed Mar 3 06:25:28 UTC 2021
On Tuesday, 2 March 2021 at 22:06:30 UTC, Ola Fosheim Grøstad
wrote:
> On Tuesday, 2 March 2021 at 21:41:40 UTC, Paul Backus wrote:
>> You are conflating types and values. Pointer *values* can be
>> either safe or unsafe, depending on what they point to.
>> Pointer *types* are always unsafe, because they include both
>> safe and unsafe values.
>
> A type-system can be made to distinguish between safe and
> unsafe pointers.
>
> A type is just a tag stuck onto a value.
For example, Active Oberon, Modula-3, C#, F#, Swift, Go, all have
this pointer distinction.
Pointers are always safe, unless explicitly marked otherwise or
used in unsafe contexts, converting between both types is also
explicit.
More information about the Digitalmars-d
mailing list