[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[school-discuss] oh no, not serpentarium



On Tue, Apr 08, 2008 at 02:28:52PM -0400, Daniel Howard wrote:
> What really interested me was the difference between the traditional 
> first lesson of printing "Hello World" in Python vs. Java:
> 
> Python:
> >>> print "Hello World"
> Hello World
> >>>
> 
> Java:
> class Hello1 {
>   public static void main(String[] args){
>     System.out.println("Hello World");
>   }
> }

Scheme:

home:~> mzscheme
Welcome to MzScheme v372 [3m], Copyright (c) 2004-2007 PLT Scheme
Inc.
> "Hello World"
"Hello World"
>

(in a browser: http://fresh.homeunix.net/~luke/jscm/repl.html)
(in a famous book: http://mitpress.mit.edu/sicp/)

Ruby:

home:~> irb
irb(main):001:0> "Hello World"
=> "Hello World"
irb(main):002:0>

(interactive ruby: http://tryruby.hobix.com/)

BTW

home:~> python
Python 2.5.1 (r251:54863, Feb  8 2008, 15:19:12)
[GCC 4.1.1 20070105 (ALT Linux, build 4.1.1-alt12)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> "Hello World"
'Hello World'
>>>

See the quotes change... bet it's a consequence of yet another kluge.

> For my elementary kids, I think Python would be much more preferable. 

Dan, don't be so merciless to them :-)

Python is a bit less boring stuff than Java, still I'm yet to 
see a seasoned developer who would recommend python as a first
programming language.

-- 
 ---- WBR, Michael Shigorin <mike@xxxxxxxxxxx>
  ------ Linux.Kiev http://www.linux.kiev.ua/