Bcpl still exists in 2018?
0: http://www.cl.cam.ac.uk/~mr10/
1: https://gist.github.com/seaneshbaugh/e09abd748ccc07c5463f253....
11–20 of 367 posts
Bcpl still exists in 2018?
0: http://www.cl.cam.ac.uk/~mr10/
1: https://gist.github.com/seaneshbaugh/e09abd748ccc07c5463f253....
Bcpl still exists in 2018?
It's aimed at teaching programming to 10 year olds no prior experience. One of the first examples is implementing RSA.
Take Erlang for example:
1> X = 1.
1
2> X = 2.
** exception error: no match of right hand side value 2
Notice variables are immutable (not just values themselves). Once X becomes 1, it can only match with 1 after that. You might think this is silly or annoying, why not just allow reassignment and instead have to sprinkle X1, X2 everywhere. But it turns out is can be nice because it makes state updates very explicit. In complicated applications that helps understand what is happening. And it behaves like you'd expect in math, in the sense that X = X + 1 doesn't make sense here either: 1> X = 1.
1
2> X = X + 1.
** exception error: no match of right hand side value 2
3>
It does pattern matching very well too, that is, it matches based on the shape of data: 1> {X,Y} = {1,2}.
{1,2}
2> X.
1
3> Y.
2
4>
In other languages we might say we have assignment and destructuring but here it is rather simple it's just pattern matching.Ken Thompson on why '=' is assignment and '==' the equality check.
It's this kind of mindset that puts me off Go. But I can totally see that many who want a better C getting into Go exactly for reasons like this.
Since in procedural language, assignment is a much more common operation than equality check, it is reasonable to favor "=" over ":=" or even "<-".
EDIT: It's since been changed to "let", "set", "equal" (but still lower-case).
Because K&R had terrible keyboards so they abbreviated everything as much as possible. Traditionally := was used for assignment, which makes sense since it is an asymmetric symbol for an asymmetric operation.
Bcpl still exists in 2018?