[swift-evolution] Epic: Typesafe calculations

David Sweeris davesweeris at mac.com
Fri Jan 1 01:13:52 CST 2016


Same here. I can fake a bit of it now by creating the relevant types ("struct _1 {...}", etc), but it's *very* fragile.

> On Dec 31, 2015, at 14:18, Matt Whiteside via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 
>>> On Dec 31, 2015, at 09:25, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
>>> 
>>> 
>>> On Dec 25, 2015, at 4:43 PM, Nickolas Pohilets via swift-evolution <swift-evolution at swift.org> wrote:
>>> 
>>> If Swift would support non-type generic parameters, then I would like to have Boost.Unit library (http://www.boost.org/doc/libs/1_60_0/doc/html/boost_units.html) available in Swift.
>> 
>> Yes, that’s an excellent design.  We really want to do this when we get the necessary language features (I hope we might also come up with some that improve readability a bit over what you can do in C++).
> 
> 
> I will do cartwheels when we can write stuff like Vector<3> or Tensor<4,4,4>.  Glad to hear it’s on your mind, including the readability aspect.
> 
> Matt
> 
> 
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151231/95a5b607/attachment.html>


More information about the swift-evolution mailing list