User loginNavigation |
Implicit conversion (subtyping) vs Explicit conversionIn the design discussions for Zen, (see: http://lambda-the-ultimate.org/node/5376) we have hit an important decision point, and I wanted to get opinions from the PL community about what they think is the best approach. The choice is between: - Implicit conversions with explicit invariance By way of an example, given a type like this - Could this cause problems where the fact that all types in the collection must be the same is a property relied upon by an algorithm. Then there is the question of boilerplate. With implicit conversion we need an annotation to say 'do not implicitly convert', in contrast by forcing explicit conversion we need an annotation (function call) to do the conversion. - Which option results in the most boilerplate depends on how often the situations occur. Do people find they are wanting to convert types (subsumption/subtyping etc) more often than they are wanting types to remain fixed. I would greatly appreciate views from the community on their experiences of designing languages with these features, or using languages with either approach. By Keean Schupke at 2016-10-12 08:28 | LtU Forum | previous forum topic | next forum topic | other blogs | 6748 reads
|
Browse archives
Active forum topics |
Recent comments
22 weeks 6 days ago
22 weeks 6 days ago
22 weeks 6 days ago
45 weeks 19 hours ago
49 weeks 2 days ago
50 weeks 6 days ago
50 weeks 6 days ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago