Skip to content

Implement non equality operator#27

Open
raffaelemancuso wants to merge 1 commit intodereckmezquita:masterfrom
raffaelemancuso:master
Open

Implement non equality operator#27
raffaelemancuso wants to merge 1 commit intodereckmezquita:masterfrom
raffaelemancuso:master

Conversation

@raffaelemancuso
Copy link

jira ticket

https://dereckmezquita.atlassian.net/browse/

todo list

  • Version bump

@raffaelemancuso
Copy link
Author

@dereckmezquita is the PR useful?

@dereckmezquita
Copy link
Owner

It does indeed, thank you @raffaem

I do comment that the enum function is experimental at this point - I don't like that we have to create a list and access the value via $value. I am still looking for a way to "bypass" the R interpreter or do something clever with R so we can do something more like this:

box::use(interface[enum])

Colours <- enum("red", "green")
myCarColour <- Colours("red")
try(myCarColour <- "yellow") # throws; no need for `$value` - this is tricky since I can't find a reliable way to intercept the assignment

Although as I dive deeper into the R runtime I am acquiescing to keeping the current syntax; it seems it is not possible to override <- per variable as I wished.

@dereckmezquita
Copy link
Owner

@raffaem please go ahead and add yourself as a contributor following the same pattern as data.table seen here: https://github.com/Rdatatable/data.table/blob/master/DESCRIPTION

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants