Since I've been thinking about array programming, I think I might as well actually learn an array programming language. The best candidate seems to be J. Reading some of the web examples seems to show that J is impressively concise. As I'm learning this, I'll make notes of what I think is most important about the language.
One thing does tend to run slightly against my grain, namely the notion of "forks" and "hooks." I think I'll get used to it though. It can be interpreted as a kind of expression inference. The only problem is, based on the types alone it's ambiguous. If I were making a language I think I might do it differently, with an explicit operator.
I want to make a statically, dependently typed J.
- functions apply equally well to data of any dimension (implicit multi-dimensional map)
- large amount of concisely named primitives. such as ?.
- Functions can be monadic or dyadic (prefix or infix) depending on usage. It's context sensitive. The monadic version of a dyadic function should be a special case of the dyadic.
- adverbs modify verbs (and are postfix). adverbs take functions to new functions. function-level programming. Important adverb: / inserts function between arguments. (reduce). In prefix, / makes a table. Also, \ applies to prefixes.
- because of the other features increasing conciseness, it's possible to learn a simple code snippet instead of a function name, and rewrite the snippet wherever needed. This has the benefit that if you forget the snippet or forget part of it, you can reconstruct it because all of its parts are syntactically meaningful.
One thing does tend to run slightly against my grain, namely the notion of "forks" and "hooks." I think I'll get used to it though. It can be interpreted as a kind of expression inference. The only problem is, based on the types alone it's ambiguous. If I were making a language I think I might do it differently, with an explicit operator.
I want to make a statically, dependently typed J.
© Bart Parkis
Last modified:Tue May 19 19:07:52 2009