ruckus
ruckus copied to clipboard
Shape creation via side effect does not allow for named objects
Take for example this code:
#lang ruckus
(let ([ball (sphere 200)]
[box (cube 300)])
(difference box ball))
This crashes, since difference
is given '()
.
Without the call to difference
, we would have this confusing program:
#lang ruckus
(let ([ball (sphere 200)]
[box (cube 300)])
ball)
Instead of showing us only the sphere, this program would show us both the ball and sphere, and happily ignore the fact that the let
form evaluates to '()
.
This isn't simply confusing behavior: it's leaves no method for naming objects.
It's a bit like a strawman version of racket where all strings evaluated to '()
, while having the side effect of printing to the console. Sure, "Hello, world!" would be simpler, but at great cost.