13
$\begingroup$

So a while back I was searching for an unused high-application order symbol I could use for an OOP framework and I ran across InlinePart (esc @> esc) in my UnicodeCharacters.tr file with an application precedence of 763 (e.g. when parsing an expression using this its formatting rules are called before those of, say, []).

When I actually use the symbol though I get this:

In[63]:= a \[InlinePart] b[10]

Out[63]= RowBox[{a, InlinePart, b}][10]

For those curious the symbol looks like this: row part

And the only reference I could find to it (outside of styling stuff or other formatting things) was this.

So what was it? Why'd it go?

$\endgroup$
4
  • $\begingroup$ I also found nothing. Not via PrintDefinitions nor anwhere else in the documentation nor in the Internet. Only a file where the shortcut was defined you've already given. I like to think, that this is simple a symbol Wolfram reserved for something a user could use for implementing new things like you want to. But i doubt it. I experimented a little bit with it but didn't found any particular use-case or other pattern beside the one already observed. This is strange. So: good question. $\endgroup$ Dec 31, 2016 at 2:21
  • $\begingroup$ I think it was removed based on the chat I found / linked to. R. M. seemed to know what it was so hopefully he will stop by and enlighten us poor souls. $\endgroup$
    – b3m2a1
    Dec 31, 2016 at 2:27
  • $\begingroup$ Interesting discovery. I'll have to read that file more carefully. Note also the behavior of InlinePart[a, b] $\endgroup$
    – Mr.Wizard
    Dec 31, 2016 at 7:50
  • $\begingroup$ And if you do System`Private`HasAnyCodesQ@InlinePart it appears to have been scrubbed from the kernel too. $\endgroup$
    – b3m2a1
    Dec 31, 2016 at 13:26

1 Answer 1

13
$\begingroup$

InlinePart or @> was an operator that was introduced in one of the pre-release/betas for version 10 and subsequently removed before public release. It was briefly available publicly in the Raspberry Pi version of Wolfram Language that co-existed with the pre-releases at the time.

The operator allowed you to access elements of a list with an infix operator. Both of these would have been equivalent:

list = {1, 2, 3};

list @> 2 (* InlinePart *)
list[[2]] (* Part *)

I think it was also more flexible than that and allowed you to access keys of Associations with assoc @> "key" syntax. The thinking probably might have been that this syntactic sugar would make it easy to chain or "drill" into a dataset with dataset @> key1 @> key2 @> key3

If I had to guess why it was discontinued, I would think that it was because it didn't bring much to the table while adding a lot of overhead (both for the end user and for the developers) and fundamentally altering a core symbol Part.

  • You couldn't use ;; or Span for flexible indexing.
  • There is the potential for visual confusion with @ and friends.
  • I don't remember, but there might have been some precedence issues as well. For example, f @ g @> 2 might have been parsed as (f @ g) @> 2 instead of f @ (g @> 2) which is different from using [[]] (I could be misremembering this).

I think in lieu of this operator, Associations was modified to support the function call syntax so that you could do assoc @ "key" which achieved the same while being more idiomatic/Mathematica like.

My memory is hazy and some parts about the motivations are speculative, but I think this is a fair summary of what this operator did during its short life. Taliesin Beynon will know more about this if you're really interested in an authoritative answer :)

$\endgroup$
8
  • $\begingroup$ Thanks a bunch. Its high parsing precedence and interesting appearance made me want it for overloading property calls, but then I just got really curious. $\endgroup$
    – b3m2a1
    Jan 6, 2017 at 6:30
  • 1
    $\begingroup$ Thanks @LeonidShifrin. It sure has been! I'm around almost every day for mod work but hardly ever answer anything (or even read most things). Hope all is well with you :) $\endgroup$
    – rm -rf
    Jan 8, 2017 at 15:09
  • $\begingroup$ @R.M. Thanks, I am fine :). Hope you are too :) I think I became progressively more like you in this regard - I keep tracking what's happening here, but rarely answer these days. But sometimes I miss the good old times. :) $\endgroup$ Jan 8, 2017 at 15:12
  • 1
    $\begingroup$ @Leonid I miss frequent contributions from both of you. I found this post just now because I was wondering what was the last time R. M. answered? It's sad to have to think that with either of you. :-( $\endgroup$
    – Mr.Wizard
    Feb 15, 2017 at 7:21
  • 1
    $\begingroup$ @Mr.Wizard I do hope that this is temporary, for me at least, and that things will change and there will be more frequent posts from me. But also, besides not having much spare time now, there just aren't as many questions asked these days which would interest me, than in the past. In any case, I do appreciate your comment and it means a lot to me. $\endgroup$ Feb 15, 2017 at 7:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.