[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: call/cc



kragen@pobox.com (Kragen Sitaker) writes:

[...]

> Python: (lambda x, y: x + y)(3, 5)       15 tokens
> OCaml: (fun x y -> x + y) 3 5            10 tokens
> Haskell: (\x y -> x + y) 3 5             10 tokens (\x is 2 tokens, -> is 1)
> FORTH: marker foo  3 5 :noname + ; execute  foo
>                                          9 tokens (explicit cleanup)
> FORTH: 3 5 :noname + ; execute           6 tokens (cheating because no GC)
> PostScript: 3 5 {add} exec               6 tokens
> dc: 3 5 [+] x                            6 tokens

i don't agree with the FORTH, PostScript and dc version since the addition is
used a simple function.

or you must allow:

OCaml: (+) 3 5            5 tokens
Haskell: (+) 3 5          5 tokens


don't you agree?