/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

gpfault.net
| | dave.cheney.net
3.9 parsecs away

Travel
| | [AI summary] The post explains how the Go runtime implements efficient hashmaps without generics by using a unique maptype descriptor and compile time rewriting to bridge the gap between generic behavior and type safety.
| | eyakubovich.github.io
4.7 parsecs away

Travel
| | Suppose we need to write a factory function that constructs a runtime polymorphic object. For the purposes of this post, let's say we want to construct a concrete shape object - a rectangle, triangle, or an ellipse. Here are our basic declarations: 1 2 3 4 5 6 7 8...
| | entangledlogs.com
4.6 parsecs away

Travel
| | Generic Programming: Generating part of programs Introduction Generic Programming: Programming with generic parameters to avoid unnecessary code duplication and encourage code reuse. Polymorphism is also another technique to solve code reuse Puts implicit constraints on the generic types that are to be fulfilled by concrete types. template T adder(T LHS, T RHS) { return LHS + RHS; } struct Foo { inv Val = 0; } Foo f = adder(Foo{}, Foo{}): In this code snippet, we assume that Foo meets the requirement tha...
| | tenthousandmeters.com
21.5 parsecs away

Travel
| Python dictionaries are an extremely important part of Python. Of course they are important because programmers use them a lot, but that's not the...