develooper Front page | perl.perl6.users | Postings from March 2021

Re: 'CALL-ME' Math problem?

Thread Previous | Thread Next
Daniel Sockwell
March 2, 2021 14:08
Re: 'CALL-ME' Math problem?
Message ID:
Kevin Pye <> wrote:
> Just because mathematics allows an implied multiplication doesn't mean Raku does -- in fact I can't
> think of any programming language which does.

As a (potentially) interesting side note, while Raku doesn't provide implied multiplication, it _is_ 
one of the few programming languages that would let you implement something very similar yourself:
   sub infix:«\c[INVISIBLE TIMES]» { $^a × $^b }

This would let you write `say 60÷5(7−5)` (with an invisible character between the `5` and the `(` )
and get the expected result.

Doing so would, of course, be a very bad idea.  But still, you _could_.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About