Reflection Is Not Contemplation
Reflection Is Not Contemplation Andrei Alexandrescu | CppCon 2024Ba-dum tsss…I’ll Start With the Punchline •Static reflection without code generation is incomplete •The “reading” part of reflection generally “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 its hinges •The two facets of reflection are equally important important •Where do AI tools fit within this craze?The Reflection Circularity Problem Without generation, we’re chasing our tails •Recall ^^x reflects on x, [:y:] unreflects (splices) y; [:^^x:] is x0 码力 | 45 页 | 2.45 MB | 5 月前3Reflection Based Libraries to Look Forward To
1Reflection based libraries to look forward to Saksham Sharma CppCon 2024 2Director, Quant Research Tech at Tower Research Capital High frequency trading firm based out of NYC Develop low latency abstractions, and clean APIs Why me 4What 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” Overview 5Reflection In code. 6Write code to Access information about other “code” Operate on that information Reflection? 7How is this different from0 码力 | 118 页 | 14.33 MB | 5 月前3Implementing Reflection Using the New C++20 Tooling Opportunity: Modules
Industry • (prev) Creative Assembly • Guerrilla4 Summary • What is reflection? • Why? • Implementing runtime reflectionWhat is reflection • Metadata of code • “What members do I have?” 5 struct Entity name]["value"] = f.value(); json[f.name]["type"] = f.type; } return json; } Why should I care about reflection?• Serialization • Binary, JSON, etc. 7 json value_to_json(any any_value) { // Handle builtins care about reflection?• Extension to the type system • WPF, Automatic Bindings • Language bindings: Python • Content editors • Automatic change detection 8 Why do I care about reflection even more0 码力 | 53 页 | 1.43 MB | 5 月前3Java 应用与开发 - 类加载和反射
程序运行时,允许改变程序结构或变量类型,这种语言称为 动态语言。从这个观点看,Perl、Python、Ruby 是动态语 言,C++、Java、C# 不是动态语言。 ▶ 但是 Java 有着一个非常突出的动态相关机制:反射 (Reflection),可以于运行时加载、探知、使用编译期间完 全未知的类。换句话说,Java 程序可以加载一个运行时才 得知名称的类,获悉其完整构造(但不包括 methods 定义), 并生成其对象实体、或对其0 码力 | 46 页 | 714.40 KB | 1 年前3Template-Less Meta-Programming
https://github.com/qlibs/mp 37 / 58Reflection for C++26* - Reflection for C++26* - Value-based Metaprogramming Value-based Metaprogramming Meta functions for Reflection (introspection, generation) Meta Meta functions for Reflection (introspection, generation) https://wg21.link/p2996 https://wg21.link/p2996 38 / 58Reflection for C++26* - Reflection for C++26* - https://wg21.link/p2996 https://wg21.link/p2996 ^^T // reflection operator (reflexpr) static_assert(^^int == ^^int); static_assert(^^int != ^^void); static_assert(typeid(^^int) == typeid(^^void)); 39 / 58Reflection for C++26* - Reflection for C++26*0 码力 | 130 页 | 5.79 MB | 5 月前3Peering Forward: C++'s Next Decade
track std::execution (concurrency and parallelism) Type and memory safety improvements Reflection + code generation (aka ‘injection’/…) Contracts means “some initial parts already voted Type and memory safety improvements target: parity with other modern languages Reflection + code generation (aka ‘injection’/…) part of our sea change to compile-time programming generation/injection generative extensions introspection of closure types function parameters reflection, splicers, meta::info, metafunctions P3294 P3157 P3273 P3096 P299615 Thanks to Matúš Chochlík0 码力 | 84 页 | 6.21 MB | 5 月前3C++26 Preview
c++26 bug 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 that the talk I Language & Library debugging structured bindings Language Templates Misc Contracts Reflection 5Outline of the talk II Library: string processing format additions containers ranges utilities int i3 = l(3); // static initialization to 3 1 2 3 4 5 6 7 8 31Language - Reflection 32Minimal viable product reflection operator (prefix ^) retruns opaque type std::meta::info consteval metafunctions0 码力 | 118 页 | 2.02 MB | 5 月前3Blender v2.92 参考手册(繁体中文版)
x / B.x, A.y / B.y, A.z / B.z)\) The cross product of A and B. The projection of A onto B. The reflection of A around the normal B. B need not be normalized. For a given incident vector A, surface normal A_x \cdot B_z \\ A_x \cdot B_y - A_y \cdot B_x \end{pmatrix}\) The projection of A onto B. The reflection of A around the normal B. B need not be normalized. For a given incident vector A, surface normal Supported Nodes Material Settings World Light Settings Light Probes 介紹 Irradiance Volumes Reflection Cubemaps Reflection Planes Limitations 介紹 Eevee is Blender's realtime render engine built using OpenGL0 码力 | 3966 页 | 203.00 MB | 1 年前3Blender v2.93 Manual
x / B.x, A.y / B.y, A.z / B.z)\) The cross product of A and B. The projection of A onto B. The reflection of A around the normal B. B need not be normalized. For a given incident vector A, surface normal A_x \cdot B_z \\ A_x \cdot B_y - A_y \cdot B_x \end{pmatrix}\) The projection of A onto B. The reflection of A around the normal B. B need not be normalized. For a given incident vector A, surface normal Material Settings World Light Settings Light Probes Introduction Irradiance Volumes Reflection Cubemaps Reflection Planes Limitations Introduction Eevee is Blender’s realtime render engine built using0 码力 | 3962 页 | 201.40 MB | 1 年前3Blender v2.92 参考手册(繁体中文版)
Cross Product The cross product of A and B. Project The projection of A onto B. Reflect The reflection of A around the normal B. B need not be normalized. Dot Product The dot product of A and B. A_x \cdot B_y - A_y \cdot B_x \end{pmatrix}\) Project The projection of A onto B. Reflect The reflection of A around the normal B. B need not be normalized. Dot Product The dot product of A and B. \(A_x Material Settings World Light Settings Light Probes Introduction Irradiance Volumes Reflection Cubemaps Reflection Planes Limitations Introduction Eevee is Blender's realtime render engine built using0 码力 | 3868 页 | 198.83 MB | 1 年前3
共 533 条
- 1
- 2
- 3
- 4
- 5
- 6
- 54