from Hacker News

The Untouched Goldmine of F#

by rmanolis on 1/12/25, 6:19 PM with 56 comments

  • by jamalaramala on 1/16/25, 2:34 PM

    > The question is: Why companies moved from monolithic to microservices? What do they try to avoid?

    One of the main reasons why companies move from monoliths to microservices is to promote ownership and accountability in large codebases.

    In a monolith where everyone owns the code, developers can break each other's code.

    With microservices, each team becomes responsible for one part, and (as long as they keep their SLAs) they can't break each other's code.

    When something fails it's easier to identify who needs to fix what.

    Microservices don't make much sense for small teams if they don't need or don't have the headcount to split responsibilities.

  • by boxed on 1/16/25, 2:04 PM

    > It may not have the information on the filename or the line of code like the ordinary stack traces, but these are useless information anyway.

    That is the weirdest and most crazy thing I've read in years.

  • by jitl on 1/16/25, 2:59 PM

    So… if I ever decide I want to change the call stack of a lower level function… I’m going to break types that all my callers and callers’ callers and callers’ callers’ callers’ are depending on? Like, my call stack is enshrined in a type so that to change it means a refactor all the way up to main()?
  • by agentultra on 1/16/25, 2:54 PM

    Is TST essentially the validation monad[0]?

    Glad to see more folks finding and appreciating FP languages like F#. It's good stuff. Scott Wlachin has a great site to discover more F# goodness[1].

    [0]: https://hackage.haskell.org/package/monad-validate-1.3.0.0/d...

    [1]: https://fsharpforfunandprofit.com/

  • by cies on 1/16/25, 1:50 PM

    > only Odin, F#, OCaml and Zig have [Tagged Unions or Discriminated Unions]

    The good old missing sum type story.

    Don't Rust, Haskell, Elm, Kotlin (with sealed classes), etc also have them?

  • by talles on 1/16/25, 2:04 PM

    > It may not have the information on the filename or the line of code like the ordinary stack traces, but these are useless information anyway.

    These are useless information?

  • by seamossfet on 1/16/25, 3:12 PM

    God I remember having to deal with F# when I was an intern, what a nightmare. It's like the worst parts of Java and C# smashed into one esoteric language.
  • by kkukshtel on 1/16/25, 3:04 PM

    C# has a much awaited and active proposal to add DUs to C# so I suspect C# will also support this once live (and continue its legacy of plucking great features from F#).

    https://github.com/dotnet/csharplang/blob/main/proposals/Typ...

  • by garganzol on 1/16/25, 3:11 PM

    Another reason why companies moved to microservices is because it is easier to manage smaller projects. Services have stronger boundaries, they can be swapped with newer and alternative implementations, it is possible to combine the power of different technologies.

    I came from the other side: I own a huge monolithic web behemoth which is almost unbearable to maintain now. It was built using a now outdated technology, but: it serves customers, it runs the business, it brings profits. Nevertheless, it is a huge pain to even try to change something in it. The project is at its dead end now, it is a one-trick pony who has become too old.

    Nowadays I build newer parts using separate well-defined services. It is not textbook microservices, I would call it just services. Imagine building a mini-product that is not publicly available and only used internally. This kind of productized services work well enough to never look back at the fragile monolithic approach.

  • by Nelkins on 1/16/25, 2:51 PM

    I upvoted this because I love F#, but I can't say I agree with the conclusions of the author.
  • by troelsSteegin on 1/16/25, 1:55 PM

    This is really about making stack traces easier to understand.
  • by jcmontx on 1/16/25, 1:47 PM

    I really like F#, but I really miss having a full fledged f#-native ORM
  • by rmanolis on 1/12/25, 6:19 PM

    F# secret superpower that no one has discovered for 30 years, and it will change its popularity in enterprise software.