HN user

frodowtf

190 karma
Posts0
Comments91
View on HN
No posts found.

If you want to use this pattern, you'll probably end up with a lot of duplicated code e.g. for SQL query builders. I could imagine that Rust makes this kind of pattern easier due to traits and macros. A lot of languages do not have these features.

And then of course Rust people care about correctness more in general.

... very low user adoption of Home Screen web apps.

Well, if nobody wants to play with our total clusterfuck of inconsistent APIs, we might as well drop support for them >:(

`panic` has nothing to do with error handling though. If you use it, you know that your callers cannot recover from it.

Throwing an exception implicitly delegates error handling back to the caller, but they are not even notified about it. (talking about OCaml)

DRY is by far the most overrated software engineering principle and constantly pushing for it only leads more developers down the way of creating wrong, irreversible abstractions.

Or you use the correct types and avoid these "problems" alltogether.

It's not possible to bake in a cold oven. Why does your type allow it then? Why don't you encode the state directly?

  oven := ColdOven.heat()
  bakedPizza := oven.bake(pizza)

... it's not intuitive how deep I am within nested scopes

The ONLY piece of information that is available to you regardless of how deep you are into a function is INDENTATION. Your curly braces won't help you.

Besides that, you should seriously reconsider your coding style if this is an actual problem for you.