[swift-evolution] [Pitch] Add the DefaultConstructible protocol to the standard library

Dave Abrahams dabrahams at apple.com
Mon Dec 26 16:31:11 CST 2016


on Mon Dec 26 2016, Adam Nemecek <adamnemecek-AT-gmail.com> wrote:

>> `ManagedBuffer` is the standard library base class that offers facilities
> for managing buffers. If there's a concrete use case that isn't served,
> then the argument would be to improve `ManagedBuffer` or to design other
> types or protocols for that use case, not to add a protocol to conform
> every type that implements `init()`.
>
> I'd prefer not to deal with raw storage unless necessary.
>
>> The distance between two values of type T does not itself need to be of
> type T,
>
> Never said otherwise.
>
>> Moreover, one can have distances being strideable opaque types that can't
> even be initialized
>
> You sure can. Doesn't disprove any of my points.
>
>> This example does not make sense, computationally or musically.
>
> You mean that it does not make any sense to you. I have two midi streams
> (and they are midi) and I want to use one midi note to transpose the other.
> I'm pretty sure that I can find a machine that does this in hardware if I
> really try. Does the fact that such machine might exist imbue the concept
> of midi addition with any meaning?

There's a Channel Coarse Tuning SysEx message for this purpose.  Even if
there weren't one, that hypothetical machine is, logically speaking,
stripping the absolute-pitch-ness off of the MIDI note used for
transposition and using it as a relative pitch offset.  It's like the
relationship between dates on the calendar and time intervals (10 days).

-- 
-Dave


More information about the swift-evolution mailing list