¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io
Re: Swift Extension on Array - not working ... hmmm
After making the LineUp class that can be iterated starting with 1 (Zero is for programmers) Customers start at ONE. Now I want the iterator to wrap around... like a team that bats around the line
By David Koontz · #35982 ·
Re: Swift Extension on Array - not working ... hmmm
// on? a slightly different note *class* LineUp { *var* lineup = [ "Bob" , "Tony" , "Iris" , "Jane" , "Nan" , "Dave" , "George" , "Ringo" , "Shannon" ] *subscript* (n: Int ) -> String { *return*
By David Koontz · #35981 ·
Re: Advice with XCFit BDD framework??
Right on Hassan. ?It's a different implementations ... https://github.com/Ahmed-Ali/Cucumberish So It is like Cucumber classic... I wonder if it is diet cuc or caffeine free?
By David Koontz · #35980 ·
Re: Swift Extension on Array - not working ... hmmm
OUCH! that black background - hurts the eyes... *var* str = "Hello, playground" // https://docs.swift.org/swift-book/LanguageGuide/Extensions.html // Extensions can add new subscripts to an
By David Koontz · #35979 ·
Re: Swift Extension on Array - not working ... hmmm
Figured it out ... with lots of help from the doc: https://docs.swift.org/swift-book/LanguageGuide/Subscripts.html at Botton of page is Type Subscript with an example
By David Koontz · #35978 ·
Re: Swift Extension on Array - not working ... hmmm
Per https://docs.swift.org/swift-book/LanguageGuide/Extensions.html <https://docs.swift.org/swift-book/LanguageGuide/Extensions.html>, "Extensions can add new functionality to a type, but they can¡¯t
By Jon Reid · #35977 ·
Swift Extension on Array - not working ... hmmm
Help an old timer out... I don't know why this does NOT work... I want to redefine the subscript method... in Swift ... *var* str = "Hello, playground" //
By David Koontz · #35976 ·
Re: What OO feature would you call Swift¡¯s Extension
perhaps I am parsing your statement poorly Jon. But I see the function in UserDefaults as Open - that's what the open keyword means. ?It is the "base" class that controls it's Open/Closed nature
By David Koontz · #35975 ·
Re: What OO feature would you call Swift¡¯s Extension
David, I think of the "seam" metaphor as "a place where two pieces are loosely stitched together, so we can safely connect different pieces." But Michael Feathers is more precise: "A seam is a
By Jon Reid · #35974 ·
Re: TDD in type-checked FP languages
Envoy¨¦ de mon iPhone It¡¯s basically passing around a structure containing functions doing the IOs you need. In Haskell, you can use various mechanisms to represent side effecting functions:
By Arnaud Bailly · #35973 ·
Re: TDD in type-checked FP languages
What do you call Handler pattern ? do you have a dummy example ?
By Gregory Salvan · #35972 ·
Re: TDD in type-checked FP languages
If you write pure code you'd probably push your state changes, IO (monads in haskell)... to the edges of your program, you also probably inject your functions as arguments. You asked about
By Gregory Salvan · #35971 ·
Re: What OO feature would you call Swift¡¯s Extension
'Seam' here refers to a concept popularised by Michael Feathers' book "Working effectively with legacy code" https://www.goodreads.com/book/show/44919.Working_Effectively_with_Legacy_Code There's
By Sleepyfox · #35970 ·
Re: What OO feature would you call Swift¡¯s Extension
That example is very helpful - thank you. I don't know the meaning of "act as our seam"? ?Why do we want/need a seam? ?What is a seam? Clearly this caveman must get out my stick (ones) and dead
By David Koontz · #35969 ·
Re: What OO feature would you call Swift¡¯s Extension
Let's say you have code that uses UserDefaults (a persistent key-value store available in Foundation for all Apple platforms). Specifically, it calls the method for setting a persistent integer.
By Jon Reid · #35968 ·
Re: What OO feature would you call Swift¡¯s Extension
Don¡¯t follow you Jon. Maybe an example would help. I¡¯m just a simple caveman. David Koontz Email: david@... (360) 259-8380 http://about.me/davidakoontz
By David Koontz · #35967 ·
Re: What OO feature would you call Swift¡¯s Extension
My favorite use of Swift extensions is wrapping a seam around an existing object: - Take a type. Any type. I don't have to own it. - Define a new Protocol which is a slice of that class (ISP) - Using
By Jon Reid · #35966 ·
What OO feature would you call Swift¡¯s Extension
I¡¯ve been pondering for a few days about this. Asked a knowledgeable colleague and still wondering. https://docs.swift.org/swift-book/LanguageGuide/Extensions.html Swift has this awesomeness
By David Koontz · #35965 ·
Re: Advice with XCFit BDD framework??
In the absence of any other context, it probably refers to a BDD tool called Cucumber -- https://cucumber.io/ -- Hassan Schroeder ------------------------ hassan.schroeder@... twitter:
By Hassan Schroeder · #35964 ·
Advice with XCFit BDD framework??
Has anyone of us used the XCFit BDD framework? https://dzone.com/articles/xcfit-full-stack-bdd-for-swift-using-xcui-cucumber I've not opened the can on this set of tools... wonder if you all have
By David Koontz · #35963 ·