5 ms·
Near-C performance, static/strong types, async io without callbacks, well integrated multithreading... maybe I'm missing something obvious, but which (not obscu
by viraptor 12y ago
Near-C performance, static/strong types, async io without callbacks, well integrated multithreading... maybe I'm missing something obvious, but which (not obscure) 15-yo language provides this set of features?
- verroq 12y agoC++
- NateDad 12y ago...that you'd actually want to program in and doesn't have footguns the size of the deathstar?
- viraptor 12y agoWell integrated multithreading? It only just started getting integrated in the latest standard. The typing is also not that strong... you can get silly implicit stuff happening in many places.
- threeseed 12y agoJava has a few projects that get you pretty close: http://docs.paralleluniverse.co/quasar/ http://docs.paralleluniverse.co/quasar/ https://github.com/Netflix/RxJava https://github.com/Netflix/RxJava
- spion 12y agoPerformance - not really that near to C Static types - of the worst kind that get in the way of creating any significant abstractions (no parametric polymorphism or generics) and don't provide much safety (no nil safety). For a new modern language, this is just weird. Well integrated multithreading - yes. 40-year-old error handling strategy: also yes. Haskell, Scala, F#, C# are all much better choices that I think fulfill all your criteria (Well, one might argue that functional languages are obscure, but that's increasingly not the case these days) I find the popularity of Go rather depressing. If Go becomes the next Java, the inventors of C would set the programming world decades back in the past for the second time.
- cookiemonster11 12y ago"40-year-old error handling strategy: also yes." What's wrong with using time tested methods that work well? If you insist on wasting cycles with exception handling you have the option of abusing panic/recover. Multiple return values make explicit error handling very easy. This is what we actually wanted when we got exceptions. C did not set the programming world back at all. C brought high level programming languages into the mainstream and it succeeded largely because of it's limitations not despite them.
- viraptor 12y agoI wasn't saying Go has them, these were just the properties listed in the parent comment. Scala adds better types to Java, otherwise they have pretty much the same properties. I was just going to disagree about C# being old. Then I checked the year... Now I'm sad, because 2000 came quite a long time ago.
- taylodl 12y agoIf Go becomes the next Java, the inventors of C would set the programming world decades back in the past for the second time That quote succinctly captures the essence of the problem with Go: it's warmed-over hash.
- spion 12y agoin reply to cookiemonster11, the wrong part is that it doesn't work well. When you asked for exceptions you actually wanted an Either type, which means the function either return a result or an error (not both). You also want something that propagates errors automatically (the monadic bind) in case you don't want to check every result. An Either type lets you get the best of both worlds. It lets you model exactly whether an error can or cannot happen (unlike exceptions that are not optional). It lets you check every return value directly via pattern matching (similarly to Go) but also, the compiler will warn you if you "forget" to handle the error case. Finally, the bind operator lets you chain operations in a way that only executes in case of no errors, plus attach a single error handler at the end to handle any of the errors (in a manner similar to exceptions) So yeah, there are better solutions today.
- coldtea 12y agoJava and C# provide all of the above, with better performance, tooling and more flexibility than Go.