|
|
Warp <war### [at] tagpovrayorg> wrote:
> I asked because 'let' sounded to me like an assignment, which is not
> functional.
it introduces a new lexically scoped binding for a constant "function". It's
not like you can't give values names in functional languages. Come on, giving
names is the simplest means of abstraction there is!
Assignment is only bad when it happens all the time, at all levels, by multiple
points in code mutating a single location, which can lead to undesired
side-effects as the source of many bugs and sync problems. As a rule of thumb,
in functional languages new locations are created rather than altering the
contents of previous ones, unless when it's not wise on the performance side.
Post a reply to this message
|
|