3 ms·
>F# has sum types, and replaces null with an option type - great ideas, but you can approximate these ideas in any language if you need to. Yes, i will approxi
by flavio81 9y ago
>F# has sum types, and replaces null with an option type - great ideas, but you can approximate these ideas in any language if you need to.
Yes, i will approximate a Formula 1 car by connecting two bicycles side to side and fitting a lawnmover motor.
- kjksf 9y agoAnd your analogy would hold if C# was to Go what a Formula 1 car is to 2 bicycles. If you insist on car analogies, Go is a good-at-most-things car. It's not the fastest car, it's not the most gas efficient car, it's not the cheapest car, it's not the best looking car, it's not the most technically advanced car but it scores in 10% percentile on all on those fundamental characteristics. Other cars are more bimodal. One car is very fast but also very expensive. Another uses the latest high-tech titanium making it very light but designers only included very small gas tank. C++ is like Homer Simpson's car: wants to have everything and ends up as a frankenstein. And I'm already regretting this car analogy because it's so unnecessary. Go gets top marks on things that matter. Fundamentals like: generates fast code, compiles quickly, has garbage collector, array bounds checking, excellent concurrency, great standard library, lots of third party libraries, generated binaries use little memory etc. Go might not have something that your favorite language X has but language X is very bad on at least one of those fundamentals. It might be 10x slower, compile code 10x slower, rely on gigantic runtime, lack any reasonable concurrency etc.
- paulddraper 9y ago> Fundamentals like: generates fast code, compiles quickly, has garbage collector, array bounds checking, excellent concurrency, great standard library, lots of third party libraries, generated binaries use little memory etc. Why doesn't Java count? * Because it doesn't have "excellent concurrency"? (I posit its concurrency is far better than C, Python, Ruby, JS, or pretty much any mainstream language) * Or because "generated binaries use little memory"? (That's the stereotype and arguable, but Java is used as the primary user space language on low end, memory constrained mobile devices. AFAIK, Go can make no such claim.) * Or something else? FWIW, Java has other fundamentals like custom generic collections, standard package management system/conventions, nullable types/optionals, and a workable error strategy.