In general there’s something fishy with the parsing of public, regardless of compat considerations. One would expect it to parse similar to export, but it doesn’t.
julia> begin
export foo
end
julia> begin
public foo
ERROR: ParseError:
# Error @ REPL[3]:2:12
begin
public foo
# └─┘ ── Expected `end`
Stacktrace:
[1] top-level scope
@ REPL:1
and
julia> :(export foo)
:(export foo)
julia> :(public foo)
ERROR: ParseError:
# Error @ REPL[5]:1:10
:(public foo)
# └─┘ ── Expected `)`
Stacktrace:
[1] top-level scope
@ REPL:1