Why did python took over scheme/lisp in popularity ?

OP
Alain De Vos

Alain De Vos

Son of Beastie

Reaction score: 869
Messages: 2,826

T.i.l. "false",0,nil count as true(#t).

PS, object-oriented, type-annotated, infix Scheme can look like this
Code:
#lang typed/racket (require infix) (require typed/racket/class)
(define-type Fish% ;--type definition
  (Class(init[size Real])
         [getsize(-> Real)]
         [grow(Real -> Void)]
         [eat((Instance Fish%) -> Void)]))
(: fish% : Fish%) ;--class type annotation
(define fish% ;--class definition
  (class object%
    (super-new)
    (init size)
     (: currentsize Real)
    (define currentsize size)
     (define/public(getsize)currentsize)
    (define/public(grow amt)
      (set! currentsize($"amt+currentsize")))
    (define/public (eat otherfish)
      (grow(send otherfish getsize)))))
(define afish1(new fish%[size 1]))(define afish2(new fish%[size 2]))
(send afish1 grow 4)(send afish1 getsize)(send afish1 eat afish2)(send afish1 getsize)
 
Top