The Roles of Symmetry And Orthogonality In Design
(automatic) data objects • Is symmetry to define state based on control-flow (static lexical scoping) • Edge cases managed by the C++ Standard (Guaranteed!) “The compiler giveth, and the compiler taketh away”Charley (automatic) data objects • Is symmetry to define state based on control-flow (static lexical scoping) • Edge cases managed by the C++ Standard (Guaranteed!) “The compiler giveth, and the compiler taketh away” data objects • Is symmetry to define state independent of control-flow (static lexical scoping) • Edge cases managed by the developer “The developer giveth, and the developer better clean up after0 码力 | 151 页 | 3.20 MB | 5 月前3Computer Programming with the Nim Programming Language
controls how data is stored in nonvolatile storage media like hard disks or SSDs, oversees all network traffic, among other tasks. An important role of the OS is enabling user programs to access all = ref object x, y: float id: int16 fs: ref set[int16] type Edge = object v1, v2: Vertex proc cmp(a, b: Edge): int = let d1 = (a.v1.x - a.v2.x) ^ 2 + (a.v1.y - a.v2.y) ^ 2 let d2 y) ^ 2 return -(d1 < d2).int + (d1 > d2).int var vertices: seq[Vertex] edges: seq[Edge] forest: seq[Edge] proc init = randomize() for i in 0 ..< Points: vertices.add(Vertex(x: rand(DataRange)0 码力 | 865 页 | 7.45 MB | 1 年前3Computer Programming with the Nim Programming Language
controls how data is stored in nonvolatile storage media like hard disks or SSDs, oversees all network traffic, among other tasks. An important role of the OS is enabling user programs to access all = ref object x, y: float id: int16 fs: ref set[int16] type Edge = object v1, v2: Vertex proc cmp(a, b: Edge): int = let d1 = (a.v1.x - a.v2.x) ^ 2 + (a.v1.y - a.v2.y) ^ 2 let d2 y) ^ 2 return -(d1 < d2).int + (d1 > d2).int var vertices: seq[Vertex] edges: seq[Edge] forest: seq[Edge] proc init = randomize() for i in 0 ..< Points: vertices.add(Vertex(x: rand(DataRange)0 码力 | 784 页 | 2.13 MB | 1 年前3The Rust Programming Language,2nd Edition
Module Definitions For our communicator networking library, we’ll first define a mod- ule named network that contains the definition of a function called connect. Every module definition in Rust starts file, above the test code: Filename: src/lib.rs mod network { fn connect() { } } After the mod keyword, we put the name of the module, network, and then a block of code in curly braces. Everything inside this block is inside the namespace network. In this case, we have a single function, connect. If we wanted to call this function from a script outside the network module, we would need to specify the0 码力 | 617 页 | 1.54 MB | 1 年前3Computer Programming with the Nim Programming Language
controls how data is stored in nonvolatile storage media like hard disks or SSDs, oversees all network traffic, among other tasks. An important role of the OS is enabling user programs to access all object 356 x, y: float id: int16 fs: ref set[int16] type Edge = object v1, v2: Vertex proc cmp(a, b: Edge): int = let d1 = (a.v1.x - a.v2.x) ^ 2 + (a.v1.y - a.v2.y) ^ 2 let d2 y) ^ 2 return -(d1 < d2).int + (d1 > d2).int var vertices: seq[Vertex] edges: seq[Edge] forest: seq[Edge] proc init = randomize() for i in 0 ..< Points: vertices.add(Vertex(x: rand(DataRange)0 码力 | 512 页 | 3.54 MB | 1 年前3Computer Programming with the Nim Programming Language
controls how data is stored in nonvolatile storage media like hard disks or SSDs, oversees all network traffic, among other tasks. An important role of the OS is enabling user programs to access all object x, y: float id: int16 fs: ref set[int16] 353 type Edge = object v1, v2: Vertex proc cmp(a, b: Edge): int = let d1 = (a.v1.x - a.v2.x) ^ 2 + (a.v1.y - a.v2.y) ^ 2 let d2 y) ^ 2 return -(d1 < d2).int + (d1 > d2).int var vertices: seq[Vertex] edges: seq[Edge] forest: seq[Edge] proc init = randomize() for i in 0 ..< Points: vertices.add(Vertex(x: rand(DataRange)0 码力 | 508 页 | 3.50 MB | 1 年前3Computer Programming with the Nim Programming Language
controls how data is stored in nonvolatile storage media like hard disks or SSDs, oversees all network traffic, among other tasks. An important role of the OS is enabling user programs to access all object 356 x, y: float id: int16 fs: ref set[int16] type Edge = object v1, v2: Vertex proc cmp(a, b: Edge): int = let d1 = (a.v1.x - a.v2.x) ^ 2 + (a.v1.y - a.v2.y) ^ 2 let d2 y) ^ 2 return -(d1 < d2).int + (d1 > d2).int var vertices: seq[Vertex] edges: seq[Edge] forest: seq[Edge] proc init = randomize() for i in 0 ..< Points: vertices.add(Vertex(x: rand(DataRange)0 码力 | 512 页 | 3.53 MB | 1 年前3Computer Programming with the Nim Programming Language
controls how data is stored in nonvolatile storage media like hard disks or SSDs, oversees all network traffic, among other tasks. An important role of the OS is enabling user programs to access all object x, y: float id: int16 fs: ref set[int16] 353 type Edge = object v1, v2: Vertex proc cmp(a, b: Edge): int = let d1 = (a.v1.x - a.v2.x) ^ 2 + (a.v1.y - a.v2.y) ^ 2 let d2 y) ^ 2 return -(d1 < d2).int + (d1 > d2).int var vertices: seq[Vertex] edges: seq[Edge] forest: seq[Edge] proc init = randomize() for i in 0 ..< Points: vertices.add(Vertex(x: rand(DataRange)0 码力 | 508 页 | 3.54 MB | 1 年前3Computer Programming with the Nim Programming Language
controls how data is stored in nonvolatile storage media like hard disks or SSDs, oversees all network traffic, among other tasks. An important role of the OS is enabling user programs to access all object x, y: float id: int16 fs: ref set[int16] 353 type Edge = object v1, v2: Vertex proc cmp(a, b: Edge): int = let d1 = (a.v1.x - a.v2.x) ^ 2 + (a.v1.y - a.v2.y) ^ 2 let d2 y) ^ 2 return -(d1 < d2).int + (d1 > d2).int var vertices: seq[Vertex] edges: seq[Edge] forest: seq[Edge] proc init = randomize() for i in 0 ..< Points: vertices.add(Vertex(x: rand(DataRange)0 码力 | 508 页 | 3.50 MB | 1 年前3Computer Programming with the Nim Programming Language
controls how data is stored in nonvolatile storage media like hard disks or SSDs, oversees all network traffic, among other tasks. An important role of the OS is enabling user programs to access all object x, y: float id: int16 fs: ref set[int16] 353 type Edge = object v1, v2: Vertex proc cmp(a, b: Edge): int = let d1 = (a.v1.x - a.v2.x) ^ 2 + (a.v1.y - a.v2.y) ^ 2 let d2 y) ^ 2 return -(d1 < d2).int + (d1 > d2).int var vertices: seq[Vertex] edges: seq[Edge] forest: seq[Edge] proc init = randomize() for i in 0 ..< Points: vertices.add(Vertex(x: rand(DataRange)0 码力 | 508 页 | 3.52 MB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100