Dollar library, good or not?


(Rick M) #1

A discussion on swift-evolution prompted me to look at the Dollar library (https://github.com/ankurp/Dollar). Is this library an example of good design? It doesn't seem to be to me. No doubt much of the actual functionality is helpful, I'm just asking about the API design.

For example, why is everything hung off a variable ("$")? Why not just a collection of global methods?

It seems to tout the fact that it's good because it does NOT extend any built-in objects, but that seems un-swifty.

Thanks,

···

--
Rick Mann
rmann@latencyzero.com


(Saagar Jha) #2

IMO no. The author's Cent library (https://github.com/ankurp/Cent/) though
looks a lot "Swift-ier" to me, using extensions rather than a global "$".

···

On Thu, Oct 20, 2016 at 15:05 Rick Mann via swift-users < swift-users@swift.org> wrote:

A discussion on swift-evolution prompted me to look at the Dollar library (
https://github.com/ankurp/Dollar). Is this library an example of good
design? It doesn't seem to be to me. No doubt much of the actual
functionality is helpful, I'm just asking about the API design.

For example, why is everything hung off a variable ("$")? Why not just a
collection of global methods?

It seems to tout the fact that it's good because it does NOT extend any
built-in objects, but that seems un-swifty.

Thanks,

--
Rick Mann
rmann@latencyzero.com

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users