Yes I am starting to see that - Julia has math-like syntax. I asked the question on SO and got an answer to use `MacroTools.jl`
So now its just `@> wallet dotTest!(5)` I am loving the macro system. This is what we need to proceed with language development. I am coming from the Scala world, and I see that Julia is very much like it, but better in terms of performance, but *arguably* worse in terms of syntax. But most syntax issues should be solvable with the use of macros. Julia is young. In particular the @> clarifies quite a bit with functional operation chains on arrays. Interesting stuff. On Monday, January 18, 2016 at 12:50:59 PM UTC-5, Stefan Karpinski wrote: > > This is usually not what you want to do. > > On Sunday, January 17, 2016, Steve Kelly <[email protected] <javascript:>> > wrote: > >> It has always been this way because of multiple dispatch. However you can >> do something like: >> >> type Wallet >> dotTest::Function >> end >> >> Which might have ambiguous performance impact. >> On Jan 17, 2016 12:45 PM, "Bryan Rivera" <[email protected]> wrote: >> >>> I have seen some code out in the wild that allows us to use dot syntax >>> like so: >>> >>> function dotTest!(wallet::Wallet, valueToAdd::Int): >>> >>> ... >>> >>> end >>> >>> wallet = Wallet(100) >>> >>> wallet.dotTest!(5) # Does not work >>> dotTest!(wallet, 5) # Works >>> >>> However I cannot get it to work, the method is not found because I am >>> not passing wallet as the arg. >>> >>> So did the language change, or am I doing it wrong? >>> >>
