BASIC vs Python

Peter Otten __peter__ at web.de
Fri Dec 17 05:49:22 EST 2004


Peter Hickman wrote:

> Mike Meyer wrote:
>> BASIC as implented by Microsoft for the Apple II and the TRS 80 (among
>> others) is simply the worst programming language I have ever
>> encountered. Assembler was better - at least you had recursion with
>> assembler.
> 
> Basic has progressed much since you last looked at it, time to update your
> facts. Basic has recursion, it compiles to native code, it has objects,
> can be event driven and everything else you would expect of a language.
> 
> Computing changes too fast to allow you to think you know it all. Keep up
> to date granddad.
> 
> However what basic doesn't have is a portable language definition.

May you could give us an idea of the current state of basic affairs then by
translating the following example snippet:

It's me wrote:

> I saw this code from an earlier post:
> 
> lst1 = ["ab", "ac", "ba", "bb", "bc"]
> lst2 = ["ac", "ab", "bd", "cb", "bb"]
> dct1 = dict.fromkeys(lst1)
> print [x for x in lst1 if x not in dct1]
> print [x for x in lst1 if x in dct1]
> 
> It's simply remarkable for somebody to be able to do it so cleanly (and so
> obviously) - "out of the box", if you may.
> 
> Sure, you can do it in Basic.  Ur...sure?  Yes, sure...

Peter




More information about the Python-list mailing list