On 16 Jan, 05:42, Chris Rebert <c...@rebertia.com> wrote: > On Thu, Jan 15, 2009 at 5:02 PM, The Music Guy <music...@alphaios.net> wrote: > > > > > Just out of curiousity, have there been any attempts to make a version > > of Python that looks like actual English text? > > [...] > Does the name "AppleScript" mean anything to you? ;-)
[quoting myself on the subject] The big advantage of AppleScript syntax is that it makes it easy to get a broad idea of what an existing AppleScript does, even if you don't know the AppleScript language in particular or programming in general. The big disadvantage of AppleScript syntax is that it makes it very difficult to form an accurate understanding of how it actually does it. For example, is 'foo bar' a property name, a constant name, a command name, a command name followed by a property/constant/variable name, or something else again? With more conventional language syntaxes, you have the opposite situation: in order to make any sense at all of an existing script, you first have to learn to read the syntax and know some basic programming. OTOH, once you're past that initial hurdle, it's easier to understand exactly what makes it tick, e.g. x.foo_bar is a property name, :foo_bar is a constant, foo_bar() is a command, foo(bar) is a command name followed by a variable name, and so on. The upshot of this is that AppleScript has a lower barrier to entry but higher cost of use compared to other languages. It's a trade-off, but one that probably fits quite well with the needs of many AppleScripters, who write relatively small programs on an irregular basis. A high cost of entry will be harder to justify if you don't actually use the language very often. OTOH, if you write large programs on a daily basis then what matters most is long-term productivity, and you'll recoup the time taken to learn a language fairly quickly by comparison. ... If you really want an end-user language that has the legibility of already-familiar natural languages while retaining all the precision provided by traditional programming syntax and adding a lot of much- needed interactive help and guidance, I think the best approach would be to go with an 'intelligent' structure editor a-la Scratch or Alice, rather than 'dumb' character-based source code as found in Python, AppleScript, Inform-7, C, et-al. See: http://scratch.mit.edu/ http://www.alice.org/ If you eliminate the need for syntax to describe structure, you can present programs in whatever way suits users best - be it English words in coloured blocks, or traditional brackets and braces. Plus it becomes an awful lot easier to help and correct novice users as they put together their first programs - much as the original Mac GUI provided much better input guidance and error prevention over previous DOS-style command lines. HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list