Skip to content

remotecall does not allow do-blocks  #11406

@oxinabox

Description

@oxinabox

remotecall does no allow do-blocks to be used to specify the method to be runremotely.
Because it takes its arguments as remotecall(id,func,args...).

this means it can't be used with do-blocks
do-blocks can only be used if the function takes a function as its first arg.

map, filter, open, etc all do this and so can have do blocks.
remotecall is the only method (that i can bring to mind), which takes a function, not as its first arg.

I know I would really like to do remote call with do-blocks as I have many functions that exist only to be passed to remote call.


I'm not sure what the fix is.
The obvious one is:

remotecall(func, id, args...) which has the downside of not the args are not clearly associated with the function.
But on the other hand, with closures we don't need to have the function take its arguements as arguments:

So all func calls like remotecall(id,func,x) become

remotecall(id) do 
      func(x) 
end

Which is a improvement if func is define for this purpose -- you wouldn't literally write func in the closure you would define func as the closure.

if using an existing method you still have remotecall(func,id,x) which as stated is ugly.

We could have both, using multiple dispatch. Since functions and ints are obviously different types.
But perhaps tht might be too confusing?

What do people think?
Is it worth making do blocks work for remotecall?
Perhaps the do-block syntax is what needs to be changed instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs decisionA decision on this change is neededparallelismParallel or distributed computation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions