News for hackers. Stuff that matters.
Re:The power of Result types in Swift by igouy on Sunday June 17, 2018 @10:16PM (#17335532)
"In BCPL,flexibility is retained by eliminating the concept of data types and representing all quantities by bit patterns of the same length. A single vector may, for example, hold bit patterns representing numbers, booleans and pointers to other vectors. Variables are declared before use, but simply as variables, not as variables of any particular type."

See chapter 13 example BCPL programs:

http://www.cl.cam.ac.uk/~mr10/bcplman.pdf

See chapter 13 example MCPL programs:

http://www.cl.cam.ac.uk/~mr10/mcplman.pdf

Re:The power of Result types in Swift by orbifold on Monday June 18, 2018 @06:23AM (#17337049)
Sounds like a nightmare, this is basically the type system of vanilla verilog: Everything is just a bitvector of a certain length, each bit can have four states X,Z,0,1, so that it allows you to assign to a 32bit vector a 16bit vector resulting in the upper 16bit to be undefined. System verilog added structs, but if you declare them packed they allow unstructured assignment. Overall it is a complete nightmare given the fact that at the end you will tape out a chip that might cost >1 million to produce.
Re:The power of Result types in Swift by pjmlp on Monday June 18, 2018 @06:47AM (#17337163)
BCPL main goal was to Bootstrap CPL, but then some people decided to use it on its own, and the rest is history.