|
|
|
|
|
by stepvhen
3252 days ago
|
|
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. |
|
I really hope the markdown has mangled this.