When you try to match featues one-to-one with the mainstream languages 3 : 0 may seem odd taken out of the learning curve context.
However, J is not a conventional language. And taking gradually from 2+2 you should be able to appreciate the design choice of 3 : 0. The focus in J is on immediately excutable compact notation. So most of the work is done in the session manager. Many units of execution (verbs, etc.) are entered in command-line too, using tacit definitions. Still staying in the session manager you realize that there are a lot of primitives and together with tacit forms, you already can do a lot of stuff. Then you have so many defined verbs that you want to put them into a file to load quickly without re-typing. By this time you learn that primitives form the core of the language, whereas foreign conjunctions are used to do all external stuff, like files. Now besides direct expressions, tacits and restoring them from files, you need a way to execute several lines of code at once, possibly with temp vars and params. That's where you come to the explicit definition: a script similar to what you stored in a file, but acting as a verb. Now choice of using foreign conjunctions looks logical. Note: so far, there is no special reserved words of special syntax: all is built from the language primitives: explicit definition facility is also a primitive: a foreign conjunction. Finally, why numbers? That's how all foreign conjunction work. It goes back to the Auxiliary Processors in APL, and even earlier to core APL functions such as trigonometric. Did you know already that load'trig' (sin , cos) f. 1&o. , 2&o. There is more to it than and totally different from just arbitrary use of constants in code. This is attaching meaning to numbers. It's not uncommon, if you are familiar with Unix, you will find it there too kill -9 chmod 755 2>&1 redirection etc. Every great language has a wierd thing or two about it, just look at SmallTalk for example, otherwise it would have been C or Java. --- p j <[EMAIL PROTECTED]> wrote: > I'm about 2 weeks new to J, myself. > I'm only mildly irritated by the 3 : 0 syntax. Though > I think it is a bad idea, and an alternative is > already defined and loaded at startup, I end up using > 3 : 0 anyways instead of "verb define". > I agree that it is a major turnoff that not everyone > will look past, but its very easy once you do look > past it, as the rules involved are easy to understand > and apply. > > <random ramble mode> > Regarding language applicability, I hope its useful as > a general purpose functional language. It does map, > reduce, and filter well enough and it does so much > more. I also like the vb/python like fallback > structures, even if I find a way to avoid using them > 99% of the time. I'm pretty excited about J, even if > i'm still learning, and reserve some prejudices > against some of its features. I hope to contribute > something interesting in a couple of days. > </random ramble mode> > > > > > > > __________________________________________________________ > Find your next car at http://autos.yahoo.ca > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
