Good point.
Again, from an educator perspective, one view is to think of the Class itself
as a singleton object in memory, with its own set of iVars and methods that
operate upon them. Although declared and defined in one source, when you
visualise as objects / relationships in memory, one mode
You are right of course.
I'm looking at this more from the eyes of an educator, where anything that
reduces ambiguity helps. Students naively gravitating towards a singleton
pattern is one of the battles I face. Some learners don't even properly
understand the difference or risks.
Invoking a
I am trying to catch SIGWINCH (terminal window size changed) in Swift 3 (Xcode
8). The following code should exit with a status of 1 when it receives
SIGWINCH. But it never exits.
```swift
// compile with `xcrun -sdk macosx swiftc sigwinch.swift`
import Darwin
import Dispatch
let source = Disp
> On Jul 2, 2016, at 11:40 AM, Jens Alfke via swift-users
> wrote:
>
> It’s hard to handle empty collections, otherwise. If endIndex were the last
> valid subscript, then in an empty collection what would its value be?
> Presumably it would have to point to one before the start, which is rathe
> On 2 Jul 2016, at 20:40, Jens Alfke wrote:
>
>
>> On Jul 2, 2016, at 9:48 AM, Tim Vermeulen via swift-users
>> mailto:swift-users@swift.org>> wrote:
>>
>> Why is endIndex one greater than the last valid subscript argument, rather
>> than simply the last valid subscript argument? I’m sure th
> On Jul 2, 2016, at 9:48 AM, Tim Vermeulen via swift-users
> wrote:
>
> Why is endIndex one greater than the last valid subscript argument, rather
> than simply the last valid subscript argument? I’m sure there are great
> reasons for this, but I just can’t think of them myself.
It’s hard t
Why is endIndex one greater than the last valid subscript argument, rather than
simply the last valid subscript argument? I’m sure there are great reasons for
this, but I just can’t think of them myself.
I’m implementing a binary tree and I want to implement BidirectionalCollection.
Each index
How make Float80 bridge with long double math.h c functions?
I resorts to use some orrible hacks like these:
// in f80.h
extern void sqrt_f80( void *result, const void *v );
extern void pow_f80( void *result, const void *v, const void *e );
...
// in f80.c
void sqrt_f80( void *result, const voi
Bar() will be released as soon as start(:)'s finishes execution. As there
is no strong reference to Bar() and the closure runs inside of function
start(:).
steps:
Bar() created
execute Bar().start(:) with {print(self.object)}
pass closure {print(self.object)} to start(:)
closure runs inside of fu