Re: English-like Python

2009-02-03 Thread Aaron Brady
On Feb 3, 2:01 pm, "J. Cliff Dyer" wrote: > On Tue, 2009-02-03 at 08:33 -0700, Joe Strout wrote: > > J. Cliff Dyer wrote: > > > > But what if your language allows functions to be used as first class > > > objects?  (Mine does :))   > > > > x = Beep > > > > Does that assign the name x to the Beep o

Re: English-like Python

2009-02-03 Thread Steve Holden
J. Cliff Dyer wrote: > On Tue, 2009-02-03 at 08:33 -0700, Joe Strout wrote: >> J. Cliff Dyer wrote: >> >>> But what if your language allows functions to be used as first class >>> objects? (Mine does :)) >>> >>> x = Beep >>> >>> Does that assign the name x to the Beep object or does it assign th

Re: English-like Python

2009-02-03 Thread J. Cliff Dyer
On Tue, 2009-02-03 at 08:33 -0700, Joe Strout wrote: > J. Cliff Dyer wrote: > > > But what if your language allows functions to be used as first class > > objects? (Mine does :)) > > > > x = Beep > > > > Does that assign the name x to the Beep object or does it assign the > > result of a Bee

Re: English-like Python

2009-02-03 Thread J. Cliff Dyer
On Thu, 2009-01-22 at 09:07 -0700, Joe Strout wrote: > >> Beep > >> > >> Doesn't get much more readable and syntax-free than that. > > > > readable doesn't mean smallest amount of syntax possible sometimes > syntax > > increases the readability of a text as you would see if we for > example

Re: English-like Python

2009-02-02 Thread Adelle Hartley
Joe Strout wrote: > Aaron Brady wrote: > >> Where functions are first-class objects, a bare function object isn't >> distinguishable either from its call. > > That depends not on whether functions are first-class objects, but on > the *syntax* of function invocation vs. function reference. It jus

Re: English-like Python

2009-01-22 Thread Joe Strout
Steven D'Aprano wrote: Foo Is that legal RB syntax? You betcha! How do you know? I haven't specified what Foo does. You haven't specified whether "Foo" is a valid identifier at all, so I'm assuming that it is both valid and used correctly here. The syntax is certainly valid -- it m

Re: English-like Python

2009-01-22 Thread Aaron Brady
On Jan 22, 2:17 am, Steven D'Aprano wrote: > On Wed, 21 Jan 2009 08:17:34 -0700, Joe Strout wrote: > > But of course.  Any method call is legal only if the form of the call > > matches the method prototype -- if you try to call a function that > > requires 4 parameters, and give it only 3, that's

Re: English-like Python

2009-01-22 Thread Aaron Brady
On Jan 22, 1:46 am, Steven D'Aprano wrote: > On Wed, 21 Jan 2009 00:57:49 -0800, Aaron Brady wrote: > > Natural language doesn't have the equivalent of parentheses, > > I take it you mean natural language doesn't have the equivalent of > parentheses for *calling*, since NLs can (and do) use parent

Re: English-like Python

2009-01-22 Thread Steven D'Aprano
On Wed, 21 Jan 2009 08:17:34 -0700, Joe Strout wrote: > Steven D'Aprano wrote: ... >> But even if RB doesn't have these things, I question that the syntax is >> "beautiful". Consider some arbitrary method Foo. If you see this: >> >> Foo >> >> Is that legal RB syntax? > > You betcha! How

Re: English-like Python

2009-01-21 Thread Steven D'Aprano
On Wed, 21 Jan 2009 00:57:49 -0800, Aaron Brady wrote: > Natural language doesn't have the equivalent of parentheses, I take it you mean natural language doesn't have the equivalent of parentheses for *calling*, since NLs can (and do) use parentheses for grouping -- as well as various conventi

Re: English-like Python

2009-01-21 Thread Aaron Brady
On Jan 21, 2:50 pm, Scott David Daniels wrote: > Benjamin J. Racine wrote: > > I think it would be a good step if you could make some sensible > > interpretation of a typical statement without its parentheses. > > > f "abc" 123 > > --> > > f( "abc", 123 ) > > > It would be just the thing in a cou

Re: English-like Python

2009-01-21 Thread Aaron Brady
On Jan 21, 9:24 am, Joe Strout wrote: > Aaron Brady wrote: > > Where functions are first-class objects, a bare function object isn't > > distinguishable either from its call. > > That depends not on whether functions are first-class objects, but on > the *syntax* of function invocation vs. functio

Re: English-like Python

2009-01-21 Thread Scott David Daniels
Benjamin J. Racine wrote: I think it would be a good step if you could make some sensible interpretation of a typical statement without its parentheses. f "abc" 123 --> f( "abc", 123 ) It would be just the thing in a couple of situations... though it does conflict with raw-string literals as

Re: English-like Python

2009-01-21 Thread Joe Strout
Aaron Brady wrote: Where functions are first-class objects, a bare function object isn't distinguishable either from its call. That depends not on whether functions are first-class objects, but on the *syntax* of function invocation vs. function reference. It just so happens than in Python,

Re: English-like Python

2009-01-21 Thread Joe Strout
Steven D'Aprano wrote: LogError "Walk has gotten too silly", CurrentTime Here, LogError is a method call that takes two arguments, and CurrentTime is a method call that takes none. That seems ambiguous to me. As a non-RealBasic programmer, I can see at least four meanings it could have. Tr

Re: English-like Python

2009-01-21 Thread Aaron Brady
On Jan 21, 2:36 am, Steven D'Aprano wrote: > On Tue, 20 Jan 2009 11:58:46 -0700, Joe Strout wrote: > > Aaron Brady wrote: > > >> I think it would be a good step if you could make some sensible > >> interpretation of a typical statement without its parentheses. > > >> f "abc" 123 > >> --> > >> f( "

Re: English-like Python

2009-01-21 Thread Aaron Brady
On Jan 20, 9:16 pm, MRAB wrote: > Terry Reedy wrote: > > Joe Strout wrote: > >> Aaron Brady wrote: > > >>> I think it would be a good step if you could make some sensible > >>> interpretation of a typical statement without its parentheses. > > >>> f "abc" 123 > >>> --> > >>> f( "abc", 123 ) > > >

Re: English-like Python

2009-01-21 Thread Steven D'Aprano
On Tue, 20 Jan 2009 11:58:46 -0700, Joe Strout wrote: > Aaron Brady wrote: > >> I think it would be a good step if you could make some sensible >> interpretation of a typical statement without its parentheses. >> >> f "abc" 123 >> --> >> f( "abc", 123 ) >> >> It would be just the thing in a cou

Re: English-like Python

2009-01-20 Thread MRAB
Terry Reedy wrote: Joe Strout wrote: Aaron Brady wrote: I think it would be a good step if you could make some sensible interpretation of a typical statement without its parentheses. f "abc" 123 --> f( "abc", 123 ) How would you differentiate f 'abc' + 'def' as f('abc') + 'def' versus f('a

Re: English-like Python

2009-01-20 Thread Terry Reedy
Joe Strout wrote: Aaron Brady wrote: I think it would be a good step if you could make some sensible interpretation of a typical statement without its parentheses. f "abc" 123 --> f( "abc", 123 ) How would you differentiate f 'abc' + 'def' as f('abc') + 'def' versus f('abc' + 'def') Such a

Re: English-like Python

2009-01-20 Thread afriere
On Jan 16, 12:02 pm, The Music Guy wrote: > Just out of curiousity, have there been any attempts to make a version > of Python that looks like actual English text? I mean, so much of Python > is already based on the English language that it seems like the next > natural step would be to make a pro

Re: English-like Python

2009-01-20 Thread Erik Max Francis
Joe Strout wrote: Aaron Brady wrote: I think it would be a good step if you could make some sensible interpretation of a typical statement without its parentheses. f "abc" 123 --> f( "abc", 123 ) It would be just the thing in a couple of situations... Such a language is possible -- take a

Re: English-like Python

2009-01-20 Thread MRAB
Joe Strout wrote: Aaron Brady wrote: Unambiguity and readability are two different things. (This should be a quasi-tangent, neither agreed, nor opposed, nor unrelated to what you said.) If you have f "abc" 123 it's unambiguous, but, if you have g f "abc" 123 "def" there's no sure way to d

RE: English-like Python

2009-01-20 Thread Benjamin J. Racine
on.org] On Behalf Of Aaron Brady Sent: Tuesday, January 20, 2009 10:14 AM To: python-list@python.org Subject: Re: English-like Python On Jan 17, 6:10 pm, The Music Guy wrote: > Wow, impressive responses. > > It sounds like the general consensus is that English would not be a > good choic

Re: English-like Python

2009-01-20 Thread Joe Strout
Aaron Brady wrote: Unambiguity and readability are two different things. (This should be a quasi-tangent, neither agreed, nor opposed, nor unrelated to what you said.) If you have f "abc" 123 it's unambiguous, but, if you have g f "abc" 123 "def" there's no sure way to determine where the

Re: English-like Python

2009-01-20 Thread Aaron Brady
On Jan 20, 12:58 pm, Joe Strout wrote: > Aaron Brady wrote: > > I think it would be a good step if you could make some sensible > > interpretation of a typical statement without its parentheses. > > > f "abc" 123 > > --> > > f( "abc", 123 ) > > > It would be just the thing in a couple of situation

Re: English-like Python

2009-01-20 Thread Abah Joseph
Python is English-like enough that everybody including non-programmers can understand it.e.g # Import the operating system module import os # define new function def open_dir_tree(path): for File in os.listdir(path): file_or_dir = os.path.join(path, File) # Read the line below

Re: English-like Python

2009-01-20 Thread Joe Strout
Aaron Brady wrote: I think it would be a good step if you could make some sensible interpretation of a typical statement without its parentheses. f "abc" 123 --> f( "abc", 123 ) It would be just the thing in a couple of situations... Such a language is possible -- take a look at REALbasic so

Re: English-like Python

2009-01-20 Thread Aaron Brady
On Jan 17, 6:10 pm, The Music Guy wrote: > Wow, impressive responses. > > It sounds like the general consensus is that English would not be a good > choice for programming even if there were an interpreter capable of > turning human language into machine language. But that makes sense; even > Engl

Re: English-like Python

2009-01-19 Thread Marco Mariani
The Music Guy wrote: Just out of curiousity, have there been any attempts to make a version of Python that looks like actual English text? Many have tried that in the decades, but IMHO the best approach is to just rename the language. We cannot do that since it's already been trademarked fo

Re: English-like Python

2009-01-18 Thread The Music Guy
Wow, impressive responses. It sounds like the general consensus is that English would not be a good choice for programming even if there were an interpreter capable of turning human language into machine language. But that makes sense; even English professionals have trouble understanding each oth

Re: English-like Python

2009-01-17 Thread Tim Rowe
2009/1/16 has : > http://www.alice.org/ Ooh, "JavaLikeSyntax.py" indeed! Why not "PythonLikeSyntax", since that's apparently what they used! -- Tim Rowe -- http://mail.python.org/mailman/listinfo/python-list

Re: English-like Python

2009-01-17 Thread Dotan Cohen
2009/1/17 Kay Schluehr : > On 16 Jan., 02:02, The Music Guy wrote: >> Just out of curiousity, have there been any attempts to make a version >> of Python that looks like actual English text? > > No, but I've once written a Python dialect that uses German text. Just > look at how amazing this resul

Re: English-like Python

2009-01-17 Thread Kay Schluehr
On 16 Jan., 02:02, The Music Guy wrote: > Just out of curiousity, have there been any attempts to make a version > of Python that looks like actual English text? No, but I've once written a Python dialect that uses German text. Just look at how amazing this result is !!! But be warned it requires

Re: English-like Python

2009-01-17 Thread Aaron Brady
On Jan 15, 7:02 pm, The Music Guy wrote: > Just out of curiousity, have there been any attempts to make a version > of Python that looks like actual English text? I mean, so much of Python > is already based on the English language that it seems like the next > natural step would be to make a prog

Re: English-like Python

2009-01-16 Thread Erik Max Francis
alex23 wrote: On Jan 16, 5:39 pm, Erik Max Francis wrote: Inform 7 has some interesting ideas, but I think the general problem with English-like programming language systems is that once you get into the nitty gritty details, you end up having to know exactly the right things to type, This ha

Re: English-like Python

2009-01-16 Thread has
On 16 Jan, 05:42, Chris Rebert wrote: > On Thu, Jan 15, 2009 at 5:02 PM, The Music Guy 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? ;-) [quo

Re: English-like Python

2009-01-16 Thread Dotan Cohen
2009/1/16 The Music Guy : > Just out of curiousity, have there been any attempts to make a version > of Python that looks like actual English text? I mean, so much of Python > is already based on the English language that it seems like the next > natural step would be to make a programming language

Re: English-like Python

2009-01-16 Thread sturlamolden
On Jan 16, 8:39 am, Erik Max Francis wrote: > I was thinking of this as well when I saw his post. Inform 7 has some > interesting ideas, but I think the general problem with English-like > programming language systems is that once you get into the nitty gritty > details, you end up having to kno

Re: English-like Python

2009-01-16 Thread MRAB
[Hit Reply instead of Reply All. Sorry alex23.] alex23 wrote: On Jan 16, 5:39 pm, Erik Max Francis wrote: Inform 7 has some interesting ideas, but I think the general problem with English-like programming language systems is that once you get into the nitty gritty details, you end up having to

Re: English-like Python

2009-01-16 Thread John Roth
On Jan 16, 3:15 am, alex23 wrote: > On Jan 16, 5:39 pm, Erik Max Francis wrote: > > > Inform 7 has some > > interesting ideas, but I think the general problem with English-like > > programming language systems is that once you get into the nitty gritty > > details, you end up having to know exact

Re: English-like Python

2009-01-16 Thread alex23
On Jan 16, 5:39 pm, Erik Max Francis wrote: > Inform 7 has some > interesting ideas, but I think the general problem with English-like > programming language systems is that once you get into the nitty gritty > details, you end up having to know exactly the right things to type, This has always b

Re: English-like Python

2009-01-15 Thread Terry Reedy
The Music Guy wrote: Just out of curiousity, have there been any attempts to make a version of Python that looks like actual English text? I mean, so much of Python is already based on the English language that it seems like the next natural step would be to make a programming language which is a

Re: English-like Python

2009-01-15 Thread Erik Max Francis
Tobias Andersson wrote: The Music Guy skrev: Just out of curiousity, have there been any attempts to make a version of Python that looks like actual English text? I mean, so much of Python is already based on the English language that it seems like the next natural step would be to make a progra

Re: English-like Python

2009-01-15 Thread Tobias Andersson
The Music Guy skrev: Just out of curiousity, have there been any attempts to make a version of Python that looks like actual English text? I mean, so much of Python is already based on the English language that it seems like the next natural step would be to make a programming language which is a

Re: English-like Python

2009-01-15 Thread Paul Rubin
The Music Guy writes: > ...might be translated as... > >>> Import the operating system module. http://coboloncogs.org -- http://mail.python.org/mailman/listinfo/python-list

Re: English-like Python

2009-01-15 Thread Chris Rebert
On Thu, Jan 15, 2009 at 5:02 PM, The Music Guy wrote: > Just out of curiousity, have there been any attempts to make a version > of Python that looks like actual English text? I mean, so much of Python > is already based on the English language that it seems like the next > natural step would be t

Re: English-like Python

2009-01-15 Thread James Mills
On Fri, Jan 16, 2009 at 11:02 AM, The Music Guy wrote: > Just out of curiousity, have there been any attempts to make a version > of Python that looks like actual English text? I mean, so much of Python > is already based on the English language that it seems like the next > natural step would be