Hacker Newsnew | past | comments | ask | show | jobs | submit | broomcorn's commentslogin

That sounds like asking for trouble. Someone coming from any other programming language could easily forget that expression evaluation is stateful. Better to be explicit and create an object representing a expression. Tell me, at least, that the variable is immutable in that context?


The good news is that most variables in R are immutable with copy-on-write semantics. Therefore, most of the time everything here will be side-effect-free and any weird editing of the variable bindings is confined to within the function. (The cases that would have side effects are very uncommonly used in my experience)


The whole magic is that expressions are in fact just objects in the language. And no, there aren't any immutable bindings here.


It's crazy how literally R takes "Everything's an object." While parentheses can be treated like syntax when writing code, it's actually a function named `(`.

Of course, playing with magic sounds fun until you remember you're trying to tell a computer to do a specific set of steps. Then magic looks more like a curse.


Broom corn is a type of sorghum that is used to make brooms. It's eally fun to watch videos of the process. I've been planning on growing some this summer.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: