5 ms·
So, I don't see that the article mentions why the language is good for emulators.
by shardling 14y ago
So, I don't see that the article mentions why the language is good for emulators.
- StavrosK 14y agoBecause it's a good opportunity to ride the Go bandwagon and get some free traffic with a list of five software projects, of course...
- drivebyacct2 14y agoPffft. Dave is hardly riding the "Go bandwagon". (I guess this comment doesn't mean much unless you know what Dave does in the community or read the ML or have had help from him in the past. It's not as if he just picked this up to be "in", though I don't want to speak out of turn for him.)
- deleted 14y ago[deleted]
- 4ad 14y agoDave is not riding the bandwagon, he is one of the Go developers working mostly on the SSH package, the ARM platform and compiler optimizations. He is also core developer of Juju, software written in Go.
- StavrosK 14y agoOh, I didn't know that. It's probably a weird choice of words, then.
- swdunlop 14y agoOff the top of my head, I can think of a few why Go is better than Python or other high level languages for writing an emulator: - Go makes it easy to write a process for your emulator, instead of a state machine. - Go's slice types makes passing blocks of memory around a zero copy operation. - Pass by value lets you reduce the number of objects GC must trace. - Go is explicit about integer size and sign, makes conversion errors more visible. It's not better than C, but it's certainly easier to work with. I'm routinely surprised at how C-friendly Go's produced code is -- take a spin through profiling some of the image library primitives and compare them against your favorite C library.
- jerf 14y agoI'd add that for anything with more than one component that needs to communicate with other components, the Go channel abstraction will get you to a reasonably performant, reasonably correct solution reasonably quickly. I used the same word three times because it may not hit any of those three bullet points 100%, if one wishes to build the fastest possible perfect emulator, but it's a decent starting toolset.
- shardling 14y agoComparing it to high level languages seems to be a bit of a red herring...
- jlgreco 14y agoHoly moly "high level language" is a moving target. A language with closures, built in high level concurrency, garbage collection, no pointer arithmetic, and a 'batteries included' standard library isn't high level these days?
- timClicks 14y agoPerhaps the intention was to say "dynamic, interpreted" languages, rather than "high level"..
- shardling 14y agoWhat? I wasn't saying anything about Go. (swdunlop is the one who injected the term "high level" into the discussion.) But if you claim that language X is good at Y, implicitly you're comparing it with all languages, not a subset. AFAIK most emulators are written in C or assembly or the like -- so it's especially odd to compare Go to everything but them in this context.
- swdunlop 14y agoI wanted something relative to ANSI C, which has no closures, no concurrency, no garbage collection, and a standard library consisting of stone tools, without invoking the horrible term "Very High Level Language", which implies Visual Basic and copypasta. ;) Perhaps I should have gone for the Monty Pythonesque "higher level than C but lower level than ASP.Net" term?
- car54whereareu 14y agoMaybe it's the for loops?