Re: Type safety, C++ and code generation
- From: <adaworks@xxxxxxxxxxxxx>
- Date: Sun, 30 Apr 2006 14:40:20 GMT
"Maciej Sobczak" <no.spam@xxxxxxxxxxx> wrote in message
news:e2qn8t$n13$1@xxxxxxxxxxxxxxxxxx
This example raises the issue of structural equivalence versus
What about making different types really distinct?
typedef ranged_type<int, 0, 100> R1;
typedef ranged_type<int, 0, 100> R2;
typedef ranged_type<int, 0, 101> R3;
Above, R1 and R2 are *equal* to the compiler, but R3 is distinct from the
other two.
name equivalence. In Ada R1 and R2 would not be
equivalent.
Ada is designed for name equivalence. Most other languages
are designed for structural equivalence. In this respect, Ada
continues to be just a wee bit more type safe than languages
designed for structural equivalence.
Richard Riehle
.
- Follow-Ups:
- Re: Type safety, C++ and code generation
- From: REH
- Re: Type safety, C++ and code generation
- References:
- Type safety, C++ and code generation
- From: Maciej Sobczak
- Re: Type safety, C++ and code generation
- From: REH
- Re: Type safety, C++ and code generation
- From: Maciej Sobczak
- Re: Type safety, C++ and code generation
- From: REH
- Re: Type safety, C++ and code generation
- From: Maciej Sobczak
- Type safety, C++ and code generation
- Prev by Date: Re: Type safety, C++ and code generation
- Next by Date: Re: Type safety, C++ and code generation
- Previous by thread: Re: Type safety, C++ and code generation
- Next by thread: Re: Type safety, C++ and code generation
- Index(es):
Relevant Pages
|