-
Notifications
You must be signed in to change notification settings - Fork 5
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
Deviations from the R langauge #6
Comments
A very minor thing, but it would be great if |
Done! This was a stealth feature, even to me! I only discovered that I baked it in last time it was mentioned over on mastodon. However, I never went back and updated this issue to document it. One point of contention here is whether to allow arbitrary numbers of empty arguments ( |
If I may add a little more to the wishlist, having sub-modules / sub-packages would also be something that I would appreciate quite a bit :) |
Yeah, I think this will be a nice-to-have. For a long time I've felt like the inability to nest packages is actually a powerful feature that forces the minimal scoping of packages and splitting them into more focused sub packages. However, what I've come to appreciate is how hard it is to develop packages that are inter-dependent (similar to the In that sense, the There's tons to consider in here that warrants its own issue when we get to that point. If you're passionate about the considerations involved here, I welcome the initiative to get the planning and design started. |
I would definitely like to work on this, but I would first try to get a better understanding of the code-base! I like the idea of making a "universe" a formalized construct. I am working on a project (mlr3) that is also a collection of dependent R packages and I know some of the troubles related to that, e.g.:
Maybe one could use rust's idea of a workspace for inspiration. |
To put another item on the agenda: I think the It might be a good idea, to define this a bit more rigorously and possibly split the |
Also, should partial argument matching still be allowed?
Some argument in favour:
Still, I think the amount of typing that is saved (this should actually not really make a big difference when having proper autocompletion) is not worth the disadvantages. |
An ongoing catalog of intentional deviations from
R
, in varying stages of maturityConfident
NULL
,TRUE
,FALSE
,Inf
,NA
)fn
as an alias forfunction
(and replacesR
lambda\()
syntax)list(a = 1,)
)Undecided
[
as a primitive for creating a vector (ie,[1, 2, 3]
)(
as a primitive for creating a list (ie(1, 2, 3)
or(a = 1, b = 2, c = 3)
)[[
as an indexing operator.With the above, indexing with a scalar value could return an element (
x[1]
), while indexing with a vector could return a vector (x[ [1, 2] ]
; spaces to emphasize that this also uses the[
operator by passing a vector,[1, 2]
- not a separate[[
operator). This is more similar topython
'spandas
indexing, but doesn't play nicely without scalar values in the first place (otherwise1
is equivalent toc(1)
an we always index by vector anyways).Needs Feedback
The text was updated successfully, but these errors were encountered: