Quote:Original post by Oluseyi
Quote:Original post by MaulingMonkey
With GNU Smalltalk, the examples had me using it in "interactive" mode, wherein you type in statements directly - e.g.:
'Hello, World!' printNl !
To print 'Hello, World!'.
print 'Hello, World!'
Yep, Python wins for clarity, intuitiveness and readability. Until you start to use expert facilities, there's hardly a language that can touch it.
The syntax is a bit weird comming from a C/C++/Java/OtherCClone background, but it's still fairly intuitive once you realize how OO centric Smalltalk is, and I'd still consider it intuitive. Ironically, this different syntax was one of the things that drew me into investigating the language.
Now, toss up a GUI example.
image := ImageMorph new.image image: (Form fromFileNamed: 'C:\Documents and Settings\Mike\My Documents\My Pictures\newavatar.gif').image openInWorld.
That loads and displays, well, I think that's pretty easily determined.
Alternative in case you dislike typing image so much:
ImageMorph new image: (Form fromFileNamed: 'C:\Documents and Settings\Mike\My Documents\My Pictures\newavatar.gif'); openInWorld.
(these work from a default install of Squeak)
I'm guessing it will take a little more work in Python, although I could be wrong. Note that I'm not saying don't use Python, I'm just trying to clarify and bring to light some of the advantages of this alternative, specifically those that came to mind when I read "drag-and-drop" (because the ImageMorph created by the above code will be rotatable, moveable, and resizable, all using the mouse, immediately).
[Edited by - MaulingMonkey on August 19, 2005 7:29:46 AM]