I wonder why the description method of collections use the debugDescription
method to print their elements, and not the description method. Example:
let s = "a\"b"
print(s) // a"b
print(s.debugDescription) // "a\"b"
let x = 1.1
print(x) // 1.1
print(x.debugDescription)
Using swift module in REPL:
Toolchain: January 4, 2017
Platform: Ubuntu 16.04
Add this at end of Package.swift:
```
products += [Product(name: "Result", type: .Library(.Dynamic), modules:
"Result")]
```
$ swift build
$ swift -I .build/debug -L .build/debug -lResult -I
Hello,
It looks that you have what you wanted because Event.Entity is an alias of
Event.
Pierre
> Le 5 janv. 2017 à 16:47, Dave Reed via swift-users a
> écrit :
>
> Is there a way to make a static or class method specify the return type be
> the actual class it is
Great, thank you Steve!
On Thu, Jan 5, 2017 at 5:04 PM, Steve (Numerics) Canon
wrote:
> Hi Jens —
>
> BinaryFloatingPoint is very deliberately limited to the arithmetic
> operations required by IEEE 754. This is the minimal set of operations that
> a binary floating point
I simplified your example package and posted a bug report here:
https://bugs.swift.org/browse/SR-3556
On Thu, Jan 5, 2017 at 9:59 PM, Yang Yang via swift-users <
swift-users@swift.org> wrote:
> sorry, i made mistake on compiling. It still report the same link error.
>
> Yang
>
> On Wed, Jan 4,
Hi All.
I think this is a case of ambiguity that the compiler is not catching at the
call site. Consider this example:
private class DefaultValues {
// If this method exists, it compiles and it called.
// If this method does not exist, the code in the test says, "Ambiguous use
of
Hi all,
I'm trying to solve a simple (?) problem where a test suite runs fine on
macOS but fails on Linux
(https://github.com/antitypical/Result/pull/210#pullrequestreview-14963305).
I've downloaded and installed the Swift Linux Docker image
(https://ashfurrow.com/blog/swift-on-linux/) and got
Exactly.
I would only add that renaming might not be the correct solution in some cases
as, then, instances of the subclass would still be able to invoke the
superclass method and that might not always be acceptable.
Wagner
> On 5 Jan 2017, at 11:09, Frank O'Dwyer
I think there is a clear case for a warning here, in that the introduction of a
default parameter value in such cases is in effect an empty promise and just
introduces unreachable code. Indeed 'unreachable code' should perhaps be the
warning.
This is because as soon as there is a foo() method,
The code below doesn't compile since there is no exponential function (exp)
that works on all FloatingPoint or BinaryFloatingPoint types, also no
protocol seems to define the power function or the constant e, although
they do define for example: basic arithmetic operators, squareRoot() and pi.
sorry, i made mistake on compiling. It still report the same link error.
Yang
On Wed, Jan 4, 2017 at 11:20 PM Yang Yang wrote:
> Thanks.
> It compiled successfully now under linux.
>
>
> 2017-01-04 12:29 GMT-06:00 Joe Groff :
>
>
>
>
> > On Dec 30, 2016,
Hi all,
I'm currently still learning Swift 3. Now I'm playing around with GCD (grand
central dispatch). I'd like to start an external process using Process from an
asynced thread, and create another thread to stop that external process after
some times. Here's what I do…
import Foundationimport
How to make my app alive to make the second queue finish its job? What I want
is:
- start program- start an external process from a thread (asynchronously)-
start another thread after 5 seconds to terminate the process from the other
thread- end program
That's all.
–Mr Bee
Pada Jumat, 6
What is your real question?
Obviously the doc says that this is fine, so what are you asking? what is your
problem?
Regards,
Rien
Site: http://balancingrock.nl
Blog: http://swiftrien.blogspot.com
Github: http://github.com/Swiftrien
Project: http://swiftfire.nl
> On 05 Jan 2017, at 20:36,
I wonder why the description method of collections use the debugDescription
method to print their elements, and not the description method.
Dmitri Gribenko gave this reason in December 2015 [1]:
Array's description shouldn't be presented to the user in raw form,
ever, so the use case here is
15 matches
Mail list logo