Hacker Newsnew | past | comments | ask | show | jobs | submit | bertylicious's commentslogin

Link is paywalled and archive.ph does not work on it. Could you please summarize the argument?

archive site seems to be working now: https://archive.is/WnoiH

This site rarely works anymore, including now, at that link. Are there any good alternatives?

Have you considered trying them out (maybe in F#) to understand why they are so popular in many other languages?


I think it's almost always about making code more concise and programming more ergonomic. Assembly could already solve all the problems higher-level languages can solve. Yet we didn't discard them as useless.


But you can have an `Either String String` which is what GP was talking about.


My mistake. I see my oversight now. `Either String String` is not equivalent to `String | String`, but to `Left String | Right String`. The same must be done for the C# version.


Yes, you must have individual constructors for the left and right cases in order to distinguish them. In C# you would use two distinct record types for this. Haskell’s syntax is more concise though, since you define the constructors inline in the declaration of the sum type.


No, it's a union of a left value (that happens to be a string) and a right value (that happens to be a string). But the compiler-generated code can't tell them apart.


What you are describing is something different called a disjoint union which will maintain the identities of the left and right values when there is overlap.

The C# unions appear to behave like unions, not disjoint unions.


My mistake. I see my oversight now. `Either String String` is not equivalent to `String | String`, but to `Left String | Right String`. The same must be done for the C# version.

You are correct that this requires support for disjoint unions (aka tagged unions), which Haskell always had and C# will soon have.


I don't think it's a matter of the type of problem and I always found it weird how F# is being framed as being only useful for "math-heavy" problems.

What matters is what libraries you are gonna use for your solution. If most of them are C#-only and don't have an F# equivalent then you'll lose the ergonomics and conveniences that make F# so easy to work with.


What's the company's name? And why the unnecessary secrecy in the first place? It's a publicly traded company so this information is public by definition.


Could you please show us an example of the change made to one of these if statements? I'm curious, because it seems absolutely wild to me to end up in such a situation (where that many changes are required and the usual refactoring tools of modern IDEs are insufficient) in the first place.


> the usual refactoring tools of modern IDEs are insufficient

Cursor doesn't have refactorings, so


I'm not impressed with your comment.


What about shadows? The UV-C light can't reach everywhere, right? What about the back and undersides of product packaging you want to sterilise?


i didn't touch the bottoms and the backs. like, put on socks, grasp box between socked feet, open box, remove the air bag packaging stuff, and if you want, UV it again. however, if you're using 185nm the ozone will get the "back" and inside. not the bottom, maybe, but if you're concerned, flip it over. If you're concerned, make sure you read research papers on exposure time of pathogens to UV-C and/or Ozone to population destruction. as i mentioned, the papers i read before i bought the bulbs said 10-60 seconds for covid. originally there was a recommendation for up to 3 minutes, but some research group went and tested shorter and shorter lengths of time. so you'd need to know the pathogen you're targeting and run it accordingly.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: