-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename of
to just
#3747
Comments
Related #3514 |
Oh no I got no preference, both |
I assume there was some prior discussion to move from |
As attached #3514 have history around. |
I feel “just” is not very meaningful and provides no context. Is “observableOf” not an option? It is very descriptive and leaves less room for confusion. |
|
My team always aliases |
What about ‘oof’? Short for “observableOf”... |
So, if you're going to do something, option 2 would be my preference, along with clear guidance. |
@wesleygrimes I was going to suggest - facetiously - that Seriously, though, I'm fine with |
If I have to choose, I'd keep If we have to change For now, just |
@alex-okrushko there was no filed issue in repo around those afaik. |
Basically, the current RxJS 4 had |
But with support for schedulers added. Now I don't know whether I prefer |
Would not 'from' be appropriate? |
@SirMaxxx |
To me it was easier to learn (and grasp the semantic difference vs
Disagree. It is a generalization
Never had problems with syntax coloring, but when you deprecate
Nope, opposite:
Exactly this is why I am against it. Please don't change api every other while. This change is not needed. It is yet another api change within a very short period of time and the value of it is questionable. Not sure if a custom operator for creation can be achieved as easily as custom pipeable ones. If so - why not use that approach, if not - let's rather have a way to create custom operator for creation and then everyone will be able to have their on So not really a good change in my eyes. 👎 |
I want |
I like const values = of('a', 'b').pipe(map(value => value.toUpperCase())) Doesn't tell me whether I'm using observables or not. I'm not sure how relevant this is though, sometimes I just imagine how the current state would work if we had these functions for ES collections too. Best case would probably be if usage like this could be treeshakable: import * as Observable from 'rxjs';
import * as rx from 'rxjs/operators';
Observable.of()
Observable.from()
new Observable.Observable() // awkward
Observable.create()
Observable.EMPTY
const values = Observable.of('a', 'b').pipe(rx.map(value => value.toUpperCase())) I also quite like the mentioned issue about |
@moniuch Although from is 'another thing' I still think it makes sense in this context. The current difference between from and of is subtle - and I don't think will be aided by making it from and just (I know it used to be just, but I don't get why?) But something like 'streamFrom' and 'From' emphasise the difference? |
I think Having some alignment with Rx implementations in other languages would make sense; not sure what the precedent is in that regard. However, ultimately aligning with Array.of() and Array.from() might carry more weight in JavaScriptland; people might find it more understandable if the same nomenclature is used. |
I do like the current |
Did you consider 'as'? |
If I can throw in another candidate into the ring |
I like |
I will defend
#WeLoveOf Re: Other possible names could be: However I'd prefer to keep |
I've changed my mind. I think Aligning RxJS with other Rx implementations has some appeal - as I've had some exposure to other implementations - but I doubt that's the situation for most RxJS users. I think point number six in @ajcrites's defence of Neither |
Whatever the outcome of this issue, I'll write some TSLint rules so that those that don't get the outcome they want might be less unhappy. If
If
|
For me it seems rename |
Okay... so given the very mixed reaction to this issue, I think we're at a stand-off. In light of that, I'm closing the issue, and we'll just stick with the status quo.
|
After speaking with @kwonoj and others, we think it would be best to rename
of
tojust
.just
in RxJS 4 and under, and in other Rx dialects)of
just
like they doof
Thoughts? Questions? Concerns?
The process here would be to:
of
, but leave itjust
(of
would aliasjust
)The text was updated successfully, but these errors were encountered: