Tagged Questions
14
votes
10answers
3k views
How to write useful Java programs without using mutable variables
I was reading an article about functional programming where the writer states
(take 25 (squares-of (integers)))
Notice that it has no variables. Indeed, it has nothing more than three ...
1
vote
4answers
374 views
How should you cleanly restrict object property types and values in Python?
I have been learning python from no long time ago. But nearly at the beginning I stumbled on simple question:
how to set a restriction (limitation) on object value or object's properties without ...
5
votes
8answers
430 views
One-use variables - has any language ever had them?
A principle that I follow is that, when an identifier is established, it should be a signal to the reader that the value referred to is indeed an abstraction which will be used more than once. That ...