J syntax is very strictly enforced; the rules for verbs are unambiguous and fairly easy to parse as a human. The difficulty arises in learning and committing these rules to memory.
For example, every verb is infix, but the right side is evaluated before the left. thus expressions like '2+34' is unambiguously different from '43+2' (the former evaluates to 14 while the latter is 24). J is a language similar to C in that it will oftwn assume you meant what you typed, but has much less undefined behavior.
Re: types, J has a type system, albeit most are numeric (support for complex and rationals are built in). I dont, personally, imagine a type system akin to Haskell or Ocaml would benefit J greatly. Almost every verb in the language is overloaded with respect to the numeric types, thats why addition works as it should with ints, floats, complex, and rationals. Whats more, it handles all that stuff in the underlying system, so that everything works together correctly (coercion and whatnot). A type systen would introduce complexity and virtually nothing more to an already complex language.
Me too. I'm trying to decipher what was typed, and not sure if I get it right. I'll try with spaces.
So, 2 + 3 * 4 is indeed 14 in J. The reason is J does calculations from right to left, so first 3 is multiplied to 4 making 12 and then 2 is added to that making 14.
The expression 4 * 3 + 2 would evaluate in J to 20 - not to 24. That's because first 3 + 2 makes 5 and then 4 * 5 makes 20. All verbs in J are of equal priority and evaluated right to left - no exceptions for arithmetical + - * % they are all equal and only right to left order matters.
May be I got it wrong and it wasn't 2 + 3 * 4 versus 4 * 3 + 2 but something else which would make 14 and 24 as results. But may be it's just a typo.
For example, every verb is infix, but the right side is evaluated before the left. thus expressions like '2+34' is unambiguously different from '43+2' (the former evaluates to 14 while the latter is 24). J is a language similar to C in that it will oftwn assume you meant what you typed, but has much less undefined behavior.
Re: types, J has a type system, albeit most are numeric (support for complex and rationals are built in). I dont, personally, imagine a type system akin to Haskell or Ocaml would benefit J greatly. Almost every verb in the language is overloaded with respect to the numeric types, thats why addition works as it should with ints, floats, complex, and rationals. Whats more, it handles all that stuff in the underlying system, so that everything works together correctly (coercion and whatnot). A type systen would introduce complexity and virtually nothing more to an already complex language.