Both of your lines are silent for me. Note though that ; does not suppress output in general, it just suppress output of printing of the final result, so e.g. printing to stdout is not suppressed:
julia> function foo()
println("Hello")
return "Hello"
end
foo (generic function with 1 method)
julia> foo()
Hello
"Hello"
julia> foo();
Hello
If someone wanted to fix this, the fix would certainly be welcomed, but doing it correctly probably requires a Julia parser like CSTParser that preserves all input in the parse result—or at least a full tokenizer that preserves all input. We eventually want something like that so that we can give better parser errors and/or do syntax highlighting in the REPL, but it’s a non-trivial project.
for now, it may be better just to muddle along and fix buglets as they are noticed, rather than to introduce a full julia parser (which will take more exec time, too).
I think it is a weakness that it is not so easy to parse julia (at least superficially). For example, when I want to determine where the current statement ends, and the command line should be coming back.
(I had hoped to convince you guys to make endif, end... aliases for end, which in many cases can make not only parsing but also quickly looking at code easier, and without invalidating existing syntax. alas, I understand that this is just one opinion.)
looking at the referenced code, what is a comment_multi in julia?
We’re already parsing, it’s just that the parser throws out extraneous stuff like irrelevant trailing semicolons. Julia’s syntax is not particularly complicated and certainly simpler than C++, Ruby, Perl and other common languages (which all have undecidable syntax, iirc). Many languages require runtime information to parse, which Julia does not. It is much more complex than Lisp, but then again so is everything.
or BASIC? (actually, I have not used basic for years, so I could be wrong here, too.) perl seems completely unparseable. I think perl 6.0 is the first version to specify the language separately from whatever its parser does. python and fortran used to be reasonably parseable.
so I think you are correct. still, indulge me and let me nudge for my matching end.* aliases to end …