4 + 4
8
In array languages the same operator can be used for arrays; or equivalently you can say that the example above sums two arrays of length 1. In J, you can do this and expect it to work: 4 4 4 + 2 2 2
6 6 6
This is true for all the built-ins, and many user defined operations (as long as you don't fiddle with so called rank of the verb you're defining).Numpy is close to that, but there's still a distinction between arrays and scalars, while in array langauges that distinction is often blurred:
4 + 1 2 3
5 6 7
Edit: in J, you can have atoms, or scalars, but you need to box them: (3;4;5)
┌─┬─┬─┐
│3│4│5│
└─┴─┴─┘
but then you can't do anything with them until you unbox them again: (3;4;5) + 3
|domain error
| (3;4;5) +3
(+&4) each (3;4;5)
┌─┬─┬─┐
│7│8│9│
└─┴─┴─┘
(Examples straight from J REPL)