Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Michael Torrie Newsgroups: comp.lang.python Subject: Re: Assignment Versus Equality Date: Sun, 26 Jun 2016 15:28:44 -0600 Lines: 27 Message-ID: References: <8a53c069-ca13-47bf-a24e-d2393a018b22@googlegroups.com> <576fd6e0$0$1617$c3e8da3$5496439d@news.astraweb.com> <2588c5b2-4b6f-cfbb-f91e-4db03aa50318@icloud.com> <8fbe89a6-c273-0fc9-820b-6ac629e6e769@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de whSXGh9q8oj5wZDh7E4e2QP3Ya1tfV5HPQA1yzk3Dtbw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.029 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'operator': 0.03; 'compiler': 0.05; 'python.': 0.11; 'syntax': 0.13; 'interpreter': 0.15; '"="': 0.16; 'compilers': 0.16; 'constructs': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'example.': 0.18; 'tree': 0.18; 'programmer': 0.18; 'language': 0.19; 'versions': 0.20; 'pascal': 0.22; 'decide': 0.23; 'bit': 0.23; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'coding': 0.27; 'least': 0.27; 'skip:( 20': 0.28; 'ronald': 0.29; 'print': 0.30; "can't": 0.32; 'language.': 0.32; 'maybe': 0.33; 'legacy': 0.33; 'message-id:@gmail.com': 0.34; 'structure': 0.34; 'next': 0.35; 'c++': 0.35; 'exist': 0.35; 'something': 0.35; 'should': 0.36; 'there': 0.36; 'basic': 0.36; 'development.': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'version': 0.38; 'several': 0.38; 'end': 0.39; 'received:192': 0.39; 'well.': 0.40; 'to:addr:python.org': 0.40; 'still': 0.40; 'some': 0.40; 'spot': 0.63; 'different': 0.63; 'between': 0.65; 'experience.': 0.66; 'feeling': 0.72; 'special': 0.73; 'sounds': 0.76; 'dialect': 0.84; 'world!"': 0.84; 'different.': 0.91; 'grew': 0.91; 'imagine': 0.96 X-Virus-Scanned: amavisd-new at torriefamily.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 In-Reply-To: <2588c5b2-4b6f-cfbb-f91e-4db03aa50318@icloud.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <8fbe89a6-c273-0fc9-820b-6ac629e6e769@gmail.com> X-Mailman-Original-References: <8a53c069-ca13-47bf-a24e-d2393a018b22@googlegroups.com> <576fd6e0$0$1617$c3e8da3$5496439d@news.astraweb.com> <2588c5b2-4b6f-cfbb-f91e-4db03aa50318@icloud.com> Xref: csiph.com comp.lang.python:110540 On 06/26/2016 12:47 PM, Christopher Reimer wrote: > I started writing a BASIC interpreter in Python. The rudimentary version > for 10 PRINT "HELLO, WORLD!" and 20 GOTO 10 ran well. The next version > to read each line into a tree structure left me feeling over my head. So > I got "Writing Compilers & Interpreters: An Applied Approach" by Ronald > Mak (1991 edition) from Amazon, which uses C for coding and Pascal as > the target language. I know a little bit of C and nothing of Pascal. > Translating an old dialect of C into modern C, learning Pascal and > figuring out the vagaries of BASIC should make for an interesting > learning experience. Sounds like fun. Every aspiring programmer should write an interpreter for some language at least once in his life! I imagine that any modern dialect of BASIC has a very complex grammar. The syntax is full of ambiguities, of which the "=" operator is the least of them. In many dialects there several versions of END to contend with, for example. And then there are a lot of legacy constructs with special syntax such as LINE (0,0)-(100,100),3,BF. I have a soft spot in my heart for BASIC, since that's what I grew up on. I still follow FreeBASIC development. It's a very mature language and compiler now, though it struggles to find a reason to exist I think. It can't decide if it's C with a different syntax, or C++ with a different syntax (object-oriented and everything) or maybe something in between or completely different.