now you are getting very close to just implementing a version of include
that takes a command object such as include(`test.jl --fast a -r 3`), which
sets ARGS then include‘s test.jl normally

python doesn't have special syntax for making command lines, so it needed
special syntax to make this possible. julia's syntax takes a few extra
characters (and an extra function definition, perhaps added to Base?), but
it can then be used as a normal operation anywhere
​

On Fri, Oct 31, 2014 at 8:03 PM, <[email protected]> wrote:

>
>
> On Saturday, November 1, 2014 10:09:46 AM UTC+11, Daniel Carrera wrote:
>>
>>
>> On 31 October 2014 18:46, Jason Merrill <[email protected]> wrote:
>>
>>> On Thursday, October 30, 2014 11:42:38 PM UTC-7, Daniel Carrera wrote:
>>>
>>>>
>>>> The point is that Julia will parse the entire line and form a parse
>>>> tree before it begins to interpret the instruction. Therefore, the @run
>>>> line has to parse correctly as valid Julia syntax.
>>>>
>>>> If you want to type fewer quotation marks, one could make a macro that
>>>> takes everything as one string:
>>>>
>>>> @run "test.jl  --fast a -r 3"
>>>>
>>>> The macro can split the string along the spaces.
>>>>
>>>
> A single string is a recipe for escaping/quoting problems when parameters
> to the command contain spaces, its best avoided.
>
> [...]
>
>>

Reply via email to