Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

What is an alternative to the backtick (`) in separating the namespace from the function name?

Can the function be called without using this symbol? I think in early versions of Mathematica one could use :: but it does not seem to work now.

share|improve this question
1  
You remember wrongly. :: (MessageName[]) was always intended for messages, and the backtick was always intended to delimit a context and a function from that context. What exactly is your problem with the backtick? –  J. M. May 25 '12 at 7:15
    
@j.m On an iPhone/iPad entering a backtick is rather time consuming. So, editing code here on MMA.SE containing a context path is extremely annoying. Other than that, I can't think of a reason for wanting to replace the backtick. –  Sjoerd C. de Vries May 25 '12 at 13:50
    
@SjoerdC.deVries maybe some write mma code on iPads? –  acl May 25 '12 at 14:26
    
@acl Wolfram is rumored to develop a iPad implementation. I hope they include the W|A keyboard, as my experience with backticking code on an iPad has lead to quite some curses. –  Sjoerd C. de Vries May 25 '12 at 15:25
    
@SjoerdC.deVries most likely a reader... –  acl May 25 '12 at 15:46

1 Answer 1

up vote 5 down vote accepted

Here's your alternative:

test`foo[x_] := x^2 (* original function in test` context *)
ToExpression["test" <> FromCharacterCode[96] <> "foo"][x] (* Look ma! No backticks! *)
(* x^2 *)
share|improve this answer
1  
Even more baroque: ToExpression["test" <> "\\[" <> "RawBackquote" <> "]" <> "foo"][x] –  J. M. May 25 '12 at 7:30
1  
@J.M. ToExpression[ "test" <> Uncompress["1:eJxTTMoPCmZkYGBIAAAM0wH5"] <> "foo"][x] –  rm -rf May 25 '12 at 7:36
1  
That ain't baroque; that's grotesque. ;) –  J. M. May 25 '12 at 7:40
3  
@J.M. if it ain't baroque, don't fix it! –  rcollyer May 25 '12 at 15:22
1  
ToExpression[ TextRecognize@ Rasterize[ Style[Row[{"test", "\[NegativeVeryThinSpace]", Rotate[",", Pi/2, {0, 1.5}], "f"}], FontSize -> 40]]][x] –  Rojo May 25 '12 at 17:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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