Hacker News new | past | comments | ask | show | jobs | submit login

In Julia, you can actually omit the `*` for multiplication, if it involves literals, i.e.

  julia> x = 10
  10
  julia> 2x
  20
  julia> 2 x
  ERROR: syntax: extra token "x" after end of expression
But you have to be careful not to use white space either.



That’s quite clever, actually. This way you could chain a complex string together with parentheses without needing a lot of pluses.

Not the most useful of features, but it does explain why * is the concat operator.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: