![]() |
#21 |
Member
Join Date: Feb 2003
Posts: 46
![]() |
|
![]() |
![]() |
![]() |
#22 |
New Member
Join Date: Feb 2005
Posts: 25
![]() |
There are many things any language designer should steal from Lisp. Naming conventions are not among them. Try explaining to a newbie why 'SETF' sets places and 'GETF' accesses property lists, or what 'TERPRI' stands for, or why the transcript logging function is called 'DRIBBLE', or... you get the idea. In any case mushcode does not look 'greek' because of its naming, but rather because of its byzantine, irregular and grotesque syntax and semantics. Much the opposite of Lisp in fact.
Edit: BTW, in K: [code] base;{|x#|(x#"0"),"0123456789ABCDEFGHIJKLMNOPQRSTU VWXYZ" y _vs z} [/quote] base[4;16;1234] ==> "04D2" Like I said, much more friendly than mushcode. |
![]() |
![]() |
![]() |
#23 |
Posts: n/a
|
It's certainly greek to a newbie non-programmer. Newbie friendly languages are notable for their readability.
Hmm I've never heard of K. It's quite terse. In Ruby I came up with this: [code] def hex(x) f = lambda {|n,r,a|f.call(n/16,r,a) if n>15;r<<a[n%16]} f.call(x.to_i,"","0123456789ABCDEF") end [/quote] I'm not sure that lambda and continuations, are what I'd call newbie friendly features though one could certainly grow in languages that have them rather than abandoning the language later. I can't imagine that the uninitiated would take to such constructs as fish to water without a lot of repeated beatings. OTOH sequential procedural thinking is quite natural for most humans. Odd that they would use that earlier posted MOO routine as I had thought MOO supported hex specifiers in formatted printing, but maybe I'm thinking of ColdC. BTW, what do you think of Groovy? |
![]() |
![]() |
#24 |
New Member
Join Date: Feb 2005
Posts: 25
![]() |
It's my favorite APL dialect. See kx.com. Designed by the same guy who did A+. The basic function without any formatting would just be tohex:{"0123456789ABCDEF" 16 _vs x}. I'll give a hint: you can index a vector by another vector. 1 2 3[0 1 2 0] ==> 1 2 3 1. Another: _vs stands for "vector from scalar." I was kidding when I said it's more newbie friendly than mushcode... kind of.
I don't think continuations (and other counter-intuitive constructs like monads, arrows etc) are particularly newbie friendly. Actually I recall having trouble understanding continuations at first myself (and don't show them ), but I don't think lambda is overly scary on its own. Really it depends on how it's being used. Map and filter are easy to explain. Fold a bit less so. Y is right out. I don't think adding a bunch of syntax for special cases (like Guido seems to want to do with Python) is a better answer, for sure. Though it might be more 'newbie friendly'. I'm not even sure how such a thing can be judged. Is it harder to learn how to use the general construct than to learn something like list comprehension syntax or generator expressions? Don't like it much at all. It seems rather superfluous in the Java-script-language context (as there are already plenty of those existing and working -- even 'Java'-ish ones, like BeanShell), its grammar is screwy... and now they're making this problem even more confusing and weird by splitting into "JSR" syntax and "Classic" syntax. What are the advantages of Groovy over something like Jython, Beanshell, ABCL? |
![]() |
![]() |
![]() |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Brothers to Battle | Rhuarc | Advertising for Players | 6 | 05-10-2004 05:30 PM |
Battle cries! | SyNo | MUD Humor | 51 | 01-22-2003 08:14 PM |
The Battle Royale | Iluvatar | Roleplaying and Storytelling | 0 | 05-14-2002 02:00 AM |
|
|