Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any programming languages with implicit multiplication? [closed]

Is there a programming language in which any of the following:

  • a numeric literal next to a variable 3x, -0.5y
  • a numeric literal or numeric variable next to a parenthesized expression a(b+c+d) 2(x-y)
  • two adjacent parenthesized expressions (1+x)(1-x) (4a-5b)(1+4c)

is interpreted to mean a multiplication?

I can see the syntactical problems that this would cause, but I'm curious if any language has gone ahead and done it anyway.

like image 453
David Zhang Avatar asked Dec 26 '22 22:12

David Zhang


2 Answers

TI-BASIC does it in certain circumstances. I believe that certain CAS oriented langauges do as well.

like image 183
Troy Avatar answered Dec 30 '22 10:12

Troy


IIRC, Fortress has a "juxtaposition operator" that for numeric types is defined as multiplication.

like image 41
Ryan Culpepper Avatar answered Dec 30 '22 10:12

Ryan Culpepper