Google C++ Style Guidetransfer of pointer ownership), leaving textual hints for the reader at the point of use is valuable (std::unique_ptr demonstrates the ownership transfer unambiguously at the call site). Be consistent with with a default value, or migrating to a new namespace. • Forward declaring symbols from namespace std:: yields undefined be- havior. • It can be difficult to determine whether a forward declaration or namespace a • Do not declare anything in namespace std, including forward declarations of standard library classes. Declaring entities in namespace std is unde- fined behavior, i.e., not portable. To declare0 码力 | 83 页 | 238.71 KB | 1 年前3
Google Python Style GuideList Comprehensions link Okay to use for simple cases. Definition: List comprehensions and generator expressions provide a concise and efficient way to create lists and iterators without resorting other list creation techniques. Generator expressions can be very efficient, since they avoid the creation of a list entirely. Cons: Complicated list comprehensions or generator expressions can be hard to z in xrange(5): if y != z: yield (x, y, z) return ((x, complicated_transform(x)) for x in long_generator_function(parameter) if x is not None) squares = [x * x for x in range(10)] eat(jelly_bean for0 码力 | 30 页 | 94.81 KB | 1 年前3
02 Scientific Reading and Writing - Introduction to Scientific Writing WS2021/22Writing Matthias Boehm, Graz University of Technology, WS 2021/22 Excursus: An Automatic CS Paper Generator SCIgen: https://pdos.csail.mit.edu/archive/scigen Generates random CS research papers, incl0 码力 | 26 页 | 613.57 KB | 1 年前3
共 3 条
- 1













