Comments (10)
It's the "most intents and purposes" part that bothers me. It seems better in my mind to just use a sentinel and real nil
than to say "it sends EXTNil which mostly behaves like nil but isn't."
from reactivecocoa.
It's really just identity checks and other methods which reveal it to be an actual object and not truly nil, but there's nothing to prevent mapping it to a real nil, like is done with RACTupleNil.
It's mostly valuable in collections, so you can save and pull out values that actually behave as nil.
from reactivecocoa.
Right, since we're almost always just mapping it to true nil
, I'm not sure what the advantage is.
My perspective is this. For consumers, nil
will always be better. So as much as we possibly can, we never expose RACTupleNil
. But the few times we do expose it, we should be honest about what it is. It's not nil. It can't be used as nil. It's a sentinel. EXTNil
blurs that line without much benefit.
from reactivecocoa.
What about RACTupleNil is superior to NSNull, then?
from reactivecocoa.
Nothing, except that it's not NSNull
. The meaning of NSNull
s isn't well-defined. The meaning of RACTupleNil
is.
from reactivecocoa.
I disagree. NSNull is used throughout Cocoa as "nil represented in a collection." In particular, that's how KVC/KVO treats it.
from reactivecocoa.
Perhaps, but users could mean NSNull
to indicate something else as well. It might have a different meaning from nil
in their use.
from reactivecocoa.
That would be user error, IMO, specifically because NSNull
already has special meaning for KVC. Like, if you use it to represent something in a property, for example, -setValuesForKeysWithDictionary:
will never be able to set it.
from reactivecocoa.
That's one use of NSNull
but AFAIK, there's nothing that says that's the only legitimate use.
RACTupleNil
is to RAC
as NSNull
is to KVC
.
from reactivecocoa.
I don't really agree with that, but I think we're at an impasse, and it's not a big deal either way.
from reactivecocoa.
Related Issues (20)
- [SwiftPM on Xcode] Package resolution failed HOT 2
- Unable to compile targeting macOS Catalyst using SwiftPM (fix exists)
- why RACObserve(self.scoreStepper,value) not available? HOT 1
- App rejected for HealthKit metadata HOT 4
- UISearchBar delegate proxy crash on Mac Catalyst HOT 1
- Build error when using ReactiveCocoa via Swift Package Manager HOT 3
- can not deinit HOT 2
- Xcode12 ReactiveObj archive error HOT 3
- How to implement PIN input with attempts HOT 1
- Dispose SignalProducer created via Action HOT 1
- UnsafeKVOProperty initializer crashes after updating to ReactiveSwift 6.5.0 HOT 1
- EXC_BAD_ACCESS Cash with NSURL HOT 1
- ReactiveCocoa 11.1.0 incompatible with ReactiveSwift 6.6.0 HOT 5
- Xcode 12.5 beta 3 can't build ReactiveCocoa with SwiftPM. HOT 2
- Using "<~" binding function with Signal.Observers causes memory leaks. HOT 1
- Upgrading from very old version (2.5) fails - can't find ReactiveCocoa.h HOT 1
- Cannot remove an observer <RACKVOProxy 0x280264940> for the key path "unit" from <HGConfigureModel 0x280d25050> because it is not registered as an observer.
- Current version can't be compiled with the latest ReactiveSwift version HOT 2
- Current version can't be compiled with the latest ReactiveSwift version HOT 6
- Add output values support for interception
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reactivecocoa.