[swift-users] build swift-package-manager-0.1 Linux Swift 2.2

2016-04-05 Thread TUNG CK via swift-users
> > Hi > I try to build swift-package-manager-0.1 from source in raspberry pi, build > success but with error on run as below > > $ swift build > Not implemented relocation type! > UNREACHABLE executed at > /mnt/usbms/package-swift/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:453! >

Re: [swift-users] Reordering tuples with named components

2016-04-05 Thread Joe Groff via swift-users
> On Apr 5, 2016, at 12:40 PM, tuuranton--- via swift-users > wrote: > > This code works great in Swift 2.2: > > > func foo() -> (a: String, b: Int) { > return ("asdf", 4) > } > > var z: (b: Int, a: String) > z = foo() > > print("\(z.0)") //4 > print("\(z.1)") //asdf > -

[swift-users] Reordering tuples with named components

2016-04-05 Thread tuuranton--- via swift-users
This code works great in Swift 2.2: func foo() -> (a: String, b: Int) {    return ("asdf", 4)} var z: (b: Int, a: String)z = foo() print("\(z.0)") //4print("\(z.1)") //asdf Notice how I have reordered a and b. As a result the meaning of .0 and .1 have changed. Can I, or am

Re: [swift-users] Memory used by enums

2016-04-05 Thread Joe Groff via swift-users
> On Apr 4, 2016, at 4:57 PM, Jonathan Hull via swift-users > wrote: > > I had a quick question on the memory used by enums with associated values in > the current implementation. If I have an enum like the following: > > enum MyEnum { > case mostCommonlyUsed > case somewhatCommo

Re: [swift-users] Memory used by enums

2016-04-05 Thread Jens Alfke via swift-users
> On Apr 4, 2016, at 4:57 PM, Jonathan Hull via swift-users > wrote: > > If this enum is going to be used by tens/hundreds of thousands of structs, am > I actually saving any space by breaking out the rarer cases which store more > data or is the footprint just equal to the largest case? Enu

Re: [swift-users] Memory used by enums

2016-04-05 Thread Daniel Eggert via swift-users
On 05 Apr 2016, at 01:57, Jonathan Hull via swift-users wrote: > > I had a quick question on the memory used by enums with associated values in > the current implementation. If I have an enum like the following: > > enum MyEnum { > case mostCommonlyUsed > case somewhatCommon (Int,

[swift-users] Memory used by enums

2016-04-05 Thread Jonathan Hull via swift-users
I had a quick question on the memory used by enums with associated values in the current implementation. If I have an enum like the following: enum MyEnum { case mostCommonlyUsed case somewhatCommon (Int,Int) case prettyRare (Int,Int,Int,Int,Int) } If this enum is going

Re: [swift-users] Question out of curiosity: why "func"

2016-04-05 Thread Jim Malak via swift-users
Hi David, Thanks for nailing that one! I have to start teaching Swift in a bit and really wanting an answer other that "Just because it felt good." _ Jim Sent from Outlook Mobile _ From: David Turnbull mailto:dturnb...@gmail.com>> Sent: Tuesday