Re:John Carmack working on Scheme as a VR scripting language
by cmiles74 on Wednesday July 01, 2015 @11:27AM
(#9812457)
For the sake of completion...
(define (hello)
(displayln "Hello world"))
Re:John Carmack working on Scheme as a VR scripting language
by jcromartie on Wednesday July 01, 2015 @08:31AM
(#9811389)
Racket has a displayln that is similar to puts or System.out.println.
1. You chose a better function name (hello0 looks a little confusing)
2. You [EDIT: actually Wikipedia] decided for whatever reason to use let rather than define in the Scheme example.
3. Dart's "print" function is more suitable for console output on a single line than Scheme's "display".
Here's the fix:
All of a sudden (f a b) doesn't seem way more complicated than f(a, b);.