...

barnacs

519

Karma

2014-12-29

Created

Recent Activity

  • In the end, your newly renamed "department of war" is just going to waste a bunch of your taxpayer money to purchase some useless overpriced tech from their cronies. My symphaties to all citizens.

  • I highly recommend self-hosting a meta-search engine to get away from any single provider without losing the benefits of either. I have been using searx[0] happily for years.

    [0]: https://github.com/searxng/searxng

  • I don't think using git should necessarily be taught as a part of a CS education. Any self respecting engineer will be capable and have the curiosity and motivation to dig into it on their own. CS should give them the prereqs to do so, such as hashing, graphs, trees, etc.

  • If the fields of a structure or the string keys of an untyped map don't match then you don't have compatibility either way. The same is not true for restricting the set of valid values.

    edit: To put it differently: To possibly be compatible with the nested "Circle" map, you need to know it is supposed to have a "Radius" key that is supposed to be a float. Type definitions just make this explicit. But just because your "Radius" can't be 0, you shouldn't make it incompatible with everything else operating on floats in general.

  • Every time you introduce a type for a "value invariant" you lose compatibility and force others to make cumbersome type conversions.

    To me, invalid values are best expressed with optional error returns along with the value that are part of the function signature. Types are best used to only encode information about the hierarchy of structures composed of primitive types. They help define and navigate the representation of composite things as opposed to just having dynamic nested maps of arbitrary strings.

HackerNews