-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
supporting different expressions for maketx run
#1600
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When discussing PR #1591, @moul thinks that the PR is not an improvement, as he sees
MsgRun
first and foremost as a tool for humans and a tool that should have its closest equivalent to Go'smain()
, whereby unlike C it doesn't take arguments or return values, and that is what a Go developer expects.This has a few major issues, in my opinion:
println
something that the users will depend upon, even though this should definitely not be depended on.println(json.Marshal(myrlm.A()))
,myrlm.A
is actually maliciously updated and now outputs an object of his own, hijacking the output.Consequently, we convened that:
MsgRun
, and that is specifying an expression to be executed, similar togno run -expr
maketx run -expr 'Hello()' -code 'package main; func Hello() int { return 42 }
. In this case it makes sense that the user can specify a return value; however, ifmain()
were still the only function allowed to run inmaketx run
and it did not support println + allowed return values, it would deviate too much from what programmers think as familiar withmain()
.Originally posted by @thehowl in #1591 (comment)
The text was updated successfully, but these errors were encountered: