4 ms·
Just out of curiosity, what is your go-to language? C# is probably my favorite general purpose language so far, although I really prefer Golang's goroutines/ch
by schrodinger 12y ago
Just out of curiosity, what is your go-to language?
C# is probably my favorite general purpose language so far, although I really prefer Golang's goroutines/channels over C#'s async model. Curious to hear other perspectives!
- rdtsc 12y agoPython for smaller self-contained projects and scripting. Erlang/Elixir for larger projects where fault tolerance or concurrency is needed. C/C++ where GC is a no-go (games, low latency, time critical data processing). Next up in the pipeline to learn and use: Rust
- _random_ 12y ago> games Ever played something like e.g. Bastion? http://en.wikipedia.org/wiki/Bastion_%28video_game%29 http://en.wikipedia.org/wiki/Bastion_%28video_game%29 I mean if you are developing the new Unreal Engine - sure. But otherwise gaming industry would benefit from more of maintainable code.
- desdiv 12y agoFor context, Bastion was written in C#. Here's what the lead developer said on the topic of GC: http://www.reddit.com/r/IAmA/comments/lwljh/iama_dev_team_of_bastion_the_action_rpg_where_an/c2w5z7u http://www.reddit.com/r/IAmA/comments/lwljh/iama_dev_team_of...
- pjmlp 12y agoThis is more appropriate http://www.reddit.com/r/IAmA/comments/lwljh/iama_dev_team_of_bastion_the_action_rpg_where_an/c2w6z3c http://www.reddit.com/r/IAmA/comments/lwljh/iama_dev_team_of...
- CmonDev 12y agoIt's simple: when looping either make stuff quick to collect or make it never collect.
- kenjackson 12y agoI'd love to see a comparison of Golang's goroutines/channels vs async. If you know of one or could write one here, that would be appreciated! :-)
- reubenbond 12y agoTask<T>/async is a slightly different beast, effectively its a goroutine+channel which can only return 1 value or throw an exception. A better alternative to channels is Rx (Reactive Extensions) which gives you IObservable<T>. It's very simple and powerful. Observables can be composed using Linq, and they're monadic (if that matters). I like the first class notion that something can fail or be completed (go has close(), which lets you complete a channel, but there is no notion of errors unless you slap a tuple in there). Rx is available on many platforms (incl JVM, JS). Rx.NET does not yet support back pressure (Rx 3.0 will, whenever Microsoft release that, maybe at //build). There's an alternative library from Microsoft called Dataflow, though, and Dataflow does support backpressure as well as a lot of other great features. Dataflow is underused, but its great. Rx & dataflow interoperate very easily (.ToObservable() etc) There are a bunch of videos from Netflix on their use of Rx, which are a good watch if you're interested. Edit: Channels in Go don't compose: I can't easily take one channel, mutate the values as they arrive, and create another channel from the mutated values. With Rx, that's just `var uppers = keyPresses.Select(key => key.ToUpper())` and now I've got a new stream of data. If keyPresses completes, so does uppers. If it fails, that failure is propagated through uppers. This isn't easy in Go. goroutines don't have any reasonable kind of monitoring. I can't say "this routine has completed/failed", I have to implement that notion every single time using a WaitGroup or something, and that only handles completion, not failure. I'm not saying C# is perfect and that go's channels/goroutines don't have any merit, just that there are some things I wish I could do more easily using them.
- Paradigma11 12y agoWhat is the bind semantic in rx?
- ghuntley 12y ago