goby-lang / goby

Goby - Yet another programming language written in Go
MIT License
3.49k stars 171 forks source link

"puts" without parens fails silently #82

Closed epitron closed 7 years ago

epitron commented 7 years ago

I was surprised when I wrote my first goby script, and nothing happened.

It looked something like this:

puts "sup homies"

There was no output, no error. I scratched my head for a while, and after looking at the samples, noticed that parens are required.

It's strange, since other functions give an error when you call them without parens. Is puts special?

st0012 commented 7 years ago

No, puts is not a special case. And for now we haven't update our parser for removing parens from method call, but we will work on it soon. Thanks for report!

st0012 commented 7 years ago

This should be fixed after #146 get is done.

adlerhsieh commented 7 years ago

It works well.

st0012 commented 7 years ago

@epitron We already fixed this by supporting method call without parens, so I'm closing this now.