Reflection Is Not Contemplation## Reflection Is Not Contemplation Andrei Alexandrescu | CppCon 2024 ## B ## Ba-dum tsss ## I ’ll Start With the Punchline • Static reflection without code generation is incomplete • The “reading” “reading” part of reflection generally agreed upon • The “generation” part of reflection suffered of neglect • P2996 very gingerly sneaks in a foot in the door (define_class) • P3294 finally blows the door off off its hinges • The two facets of reflection are equally important • Where do AI tools fit within this craze? ## The Reflection Circularity Problem Without generation, we're chasing our tails •0 码力 | 45 页 | 2.45 MB | 1 年前3
Reflection Based Libraries to Look Forward To## +24 ## Reflection Based Libraries to Look Forward To ## SAKSHAM SHARMA ## Reflection based libraries to look forward to ## Saksham Sharma CppCon 2024 ## Why me Director, Quant Research Tech at clean APIs ## Overview • What is reflection • Reflection in other languages (Go, Python, Java) • Reflection in C++ as per P2996 ☐ Syntax and examples • Reflection libraries! Python bindings ABI hashing ) • Alternatives ways to achieve “reflection” ## Reflection In code.  ## Reflection? ## Write code to • Access information0 码力 | 118 页 | 14.33 MB | 1 年前3
Object Introspection: A Revolutionary Memory Profiler for C++ Objects## +23 ## Object Introspection: A Revolutionary Memory Profiler for C++ Objects ## JONATHAN HASLAM & ADITYA SARWADE 20 23 October 01 - 06 ## Scene Setting “... functions then provide the basic [Image](/uploads/documents/f/9/2/d/f92d6739cbe6128deb047eb1259822d6/p4_1.jpg) ## Object Introspection (Ol) Goals - Byte level memory footprint analysis for objects • Complete object type hierarchies Type/Layout Reconstruction • Code Generation • Object Introspection as a Library • Object Introspection as a Profiler • Object Introspection Applied  Creative Assembly • c6f9d1987f99771d61126d94b402/p2_2.jpg) ## Summary • What is reflection? • Why? • Implementing runtime reflection ## What is reflection • Metadata of code • "What members do I have?" struct Entity { int health; std::string tag; void eat_burger(); }; ## Why should I care about reflection? • Serialization • Binary, JSON, etc. json sanitize_struct(any any_value) { json json;0 码力 | 53 页 | 1.43 MB | 1 年前3
Julia 1.9.3 Documentation... 581 41.13 Versioning ..... 594 41.14 Errors ..... 595 41.15 Events ..... 605 41.16 Reflection ..... 606 41.17 Code loading ..... 611 41.18 Internals ..... 613 41.19 Meta ..... 619 42 UUIDs ..... 1479 100 Unicode ..... 1481 IV Developer Documentation ..... 1485 101 Reflection and Introspection ..... 1486 101.1 Module bindings ..... 1486 101.2 DataType fields ..... 1486 101 method to Any for such cases. One common mistake is to try and get the element-type by using introspection: eltype_wrong(::Type{A}) where {A<:AbstractArray} = A.parameters[1] However, it is not hard0 码力 | 1644 页 | 5.27 MB | 2 年前3
Julia 1.9.0 rc1 DocumentationValues 578 41.12 System 581 41.13 Versioning 594 41.14 Errors 595 41.15 Events 605 41.16 Reflection 606 41.17 Code loading 611 41.18 Internals 613 41.19 Meta 619 42 Collections and Data Structures UUIDs ..... 1479 100 Unicode ..... 1481 IV Developer Documentation ..... 1485 101 Reflection and Introspection ..... 1486 101.1 Module bindings ..... 1486 101.2 DataType fields ..... 1486 101 method to Any for such cases. One common mistake is to try and get the element-type by using introspection: eltype_wrong(::Type{A}) where {A<:AbstractArray} = A.parameters[1] However, it is not hard0 码力 | 1644 页 | 5.27 MB | 2 年前3
Julia v1.9.4 Documentation... 581 41.13 Versioning ..... 594 41.14 Errors ..... 595 41.15 Events ..... 605 41.16 Reflection ..... 606 41.17 Code loading ..... 611 41.18 Internals ..... 613 41.19 Meta ..... 619 42 UUIDs ..... 1479 100 Unicode ..... 1481 IV Developer Documentation ..... 1485 101 Reflection and Introspection ..... 1486 101.1 Module bindings ..... 1486 101.2 DataType fields ..... 1486 101 method to Any for such cases. One common mistake is to try and get the element-type by using introspection: eltype_wrong(::Type{A}) where {A<:AbstractArray} = A.parameters[1] However, it is not hard0 码力 | 1644 页 | 5.27 MB | 2 年前3
Julia 1.9.2 Documentation... 581 41.13 Versioning ..... 594 41.14 Errors ..... 595 41.15 Events ..... 605 41.16 Reflection ..... 606 41.17 Code loading ..... 611 41.18 Internals ..... 613 41.19 Meta ..... 619 42 UUIDs ..... 1479 100 Unicode ..... 1481 IV Developer Documentation ..... 1485 101 Reflection and Introspection ..... 1486 101.1 Module bindings ..... 1486 101.2 DataType fields ..... 1486 101 method to Any for such cases. One common mistake is to try and get the element-type by using introspection: eltype_wrong(::Type{A}) where {A<:AbstractArray} = A.parameters[1] However, it is not hard0 码力 | 1644 页 | 5.27 MB | 2 年前3
C++26 Previewbug fixes - always a high priority • concurrency support std::execution (P2300) • networking • reflection, contracts, pattern matching • additions to c++20/23 features ranges, format • mop up c++23 stuff • structured bindings • Language • Templates • Misc • Contracts • Reflection ## Outline of the talk II ## • Library: ■ string processing ■ format additions ■ containers const int i3 = 1(3); // static initialization to 3 Language - Reflection ## P2996 Reflection for C++26 • Minimal viable product • reflection operator (prefix ^) • retruns opaque type std::meta::info0 码力 | 118 页 | 2.02 MB | 1 年前3
Julia 1.9.0 rc2 DocumentationValues 578 41.12 System 581 41.13 Versioning 594 41.14 Errors 595 41.15 Events 605 41.16 Reflection 606 41.17 Code loading 611 41.18 Internals 613 41.19 Meta 619 42 Collections and Data Structures UUIDs ..... 1479 100 Unicode ..... 1481 IV Developer Documentation ..... 1485 101 Reflection and Introspection ..... 1486 101.1 Module bindings ..... 1486 101.2 DataType fields ..... 1486 101 method to Any for such cases. One common mistake is to try and get the element-type by using introspection: eltype_wrong(::Type{A}) where {A<:AbstractArray} = A.parameters[1] However, it is not hard0 码力 | 1644 页 | 5.27 MB | 2 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100
相关搜索词
反射生成静态反射代码生成模板元编程ReflectionC++Python bindingsABI hashingTemplate metaprogrammingObject IntrospectionMemory ProfilerType ReconstructionCode GenerationDebug InfoC++20ModulesRuntimeMetadataDocumentation systemDebuggingREPLReflection/introspectionCompiler/Runtime improvementsJuliaCrashesMetaprogrammingDocumentationdebuggingUnit TestingC++26ConcurrencyNetworkingRangesJulia 1.9.0-rc2Base Submodules













