-
Notifications
You must be signed in to change notification settings - Fork 108
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/alias :=?
operator to :?=
#93
Comments
Happy to add the new operator as an alias now, but will leave the other one for now and consider removing it later. |
I was wondering also: is it possible to provide some operator (or reuse ("none" ~= jEmptyObject) == None
("some" ~= jSingleObject("test", "value")) == Some(Json("some" := jSingleObject("test", "value"))) |
|
@seigert This is what you were after in the first instance?
As for the follow up, the best I can suggest for now is:
I will have a think about adding something to do that, but if you really want it can you just throw it in another issue so I can close this one when I release the operator change. |
@markhibberd Yep, that's what I meant. Will move second part to a separate issue. |
Consider following example:
StringWrap.:=
ends with=
symbol and thus, according to SLS 6.12.4, has lowest precedence of all infix operators.StringWrap.:=?
forOption
s ends with?
which implies that it is 'normal' infix operator with precedence defined by first:
symbol.:
has higher precedence than letters, according to SLS 6.12.3 and that what requires us to putOption(1)) filter (_ < 0)
in additional, otherwise unnecessary, brackets.The text was updated successfully, but these errors were encountered: