4 ms·
Java is not a systems language. You need a virtual machine to run Java (or at least that's the point). Why is Go an excellent language for writing daemons? I
by driax 16y ago
Java is not a systems language. You need a virtual machine to run Java (or at least that's the point).
Why is Go an excellent language for writing daemons?
I think[1] that it's because Go is light-weight language, but still a "systems language". Low memory use which are important for daemons, while being significantly less complex than C++, and more typed than C.
Building daemons in Java, .Net, python, ruby, whatever really takes an impact on memory usage[2]. And python, ruby also on performance. C++, C takes a impact on development time and/or type safety.
[1]: (I haven't really looked much into Go)
[2]: This of cause depends: If you already are using Java and thus have loading many of the libraries needed, I would guess the impact is significantly less.
- mahmud 16y ago1) You are very wrong about Java not being a systems language, in fact, it's a whole platform. Java supplants Posix, Win32 and whatever else that shipped from your OS vendor. 2) You haven't argued well for the daemon-friendly aspects of Go. Memory footprint is not a valid excuse; I have written daemons in shell-scripts, and they had smaller memory foot print than anything you would write in Ruby or Python, because the shell executable is always resident in memory ;-) In fact, with Go lacking any sort of exception handling mechanism, I think I trust Bash scripts more[1] ;-) [1] http://linux.die.net/man/1/trap http://linux.die.net/man/1/trap
- enneff 16y agoYou are wrong about Go lacking exceptions. See panic/recover/defer in the spec.
- mahmud 16y agoAre these exceptions typed and/or checked? FWIW, the FAQ itself says it doesn't have proper exception handling: "Why does Go not have exceptions?" http://golang.org/doc/go_lang_faq.html http://golang.org/doc/go_lang_faq.html
- enneff 16y agoI am tired of answering questions you can't be bothered answering yourself. It wouldn't bother me so much if you hadn't already formed such strong opinions already. If you're not interested in learning the language, then just be quiet. It's not useful to spread misinformation about something you don't understand.
- kaib 16y agoIn this context systems language is difference from having access to the operating system. A systems language lets you write things like device drivers or operating systems.
- mahmud 16y agoThe only "systems language" is one that an OS with its accompanying device drivers are written in. Would you consider C a systems language? well, C is useless under a LispOS, for example. Ditto for Java. If you wrote the whole OS in Java, presto, Java would be the language to write device drivers. IOW, "systems" is a relative term.
- deleted 16y ago[deleted]