By: Sridhar Ramesh
You can totally (re-)assign to “variables” in Python. You’ve illustrated just that with your third line above. It just happens to be the case that Python picked this silly syntax which makes...
View ArticleBy: Sridhar Ramesh
For what it’s worth, mhelvens, I too lean towards a name like “mutables” in my own head. “assignables” just doesn’t quite have the right connotations for me; after all, even traditional mathematical...
View ArticleBy: Sridhar Ramesh
I suppose you might claim that the third line also creates a new variable named “a”. But that can easily be countered: a = ['x'] if random.randint(0, 1) : a = ['y'] else: a = ['z'] print(a) If each =...
View ArticleBy: gasche
> Assignables admit disequality, variables do not. Of course, but you could express this as well by using variables denoting locations, where locations are values that admit a disequality test. In...
View ArticleBy: Robert Harper
Well, the full answer is in my book, and is hard to summarize in a brief reply. What you’re calling “locations” is probably synonymous with my “assignables”; I admit that one could have chosen another...
View ArticleBy: omerzach
But if everyone called them assignables eventually some poor foreign programming language designer would come up with a great language whose only fault was syntax like “ass x := 7″.
View ArticleBy: gasche
Luke, I think of the “=” operator as assignment, yet get the correct answer about this code: it is ‘+’, not ‘=’, that does the copying here. You should consider the following example: >>> a =...
View ArticleBy: jamesiry
I”ve had a related discussion many times, usually in response to a claim that “Haskell doesn’t have variables.” I’ve usually convinced the other party that they’re confused about what they mean by...
View ArticleBy: Noam
You could also use “mnemoid”: http://www.pps.jussieu.fr/~mellies/slides/oregon-slides-2011-D.pdf
View Article
More Pages to Explore .....