3 ms·
I disagree with all of the preconditions this article suggests (and don't see why they are needed in the article)but I do agree that it is better to be able to
by zabzonk 6y ago
I disagree with all of the preconditions this article suggests (and don't see why they are needed in the article)but I do agree that it is better to be able to say:
a = b + c
rather than
a.assign( b.add(c))
- gumby 6y agoAs a Lisp programmer I never felt the need for syntactic operators. The case you cite doesn't look any worse to me. Metasynactic operators (like quotes) are a different matter but you need so few it's no big difference. I do write `c = a + b` in c++ but simply as it's the local convention. `=` is a non-intuitive assignment operator and no more natural than `assign`.
- zabzonk 6y agoSo you don't do: (+ 1 2) Also, I don't think that a.assign( something ) is particularly natural or understandable. Am I assigning something to a, or assigning a to something?
- gumby 6y agoI usually use a dialect that allows me to use `plus` but the symbols `plus` and `+` are just names to me — just stuff you learn. As I mentioned the use of `=` for assignment is counterintuitive, but if you simply learn it as yet another name it’s no big deal. > Am I assigning something to a, or assigning a to something? Seems to me that it would be causing a side effect on a, but as I said these are just arbitrary labels that you have to learn. I find operator precedence weird and in 40+ years of continuous programming and doing math I have never been able to develop an intuition about them. But it's a thing you learn.