4 ms·
Java is everywhere. Berkeley CS162 course uses Java language to teach OS Design and Internals - they wrote a pseudo-code examples in Java, a-la SaveRegisters().
by c00p3r 16y ago
Java is everywhere. Berkeley CS162 course uses Java language to teach OS Design and Internals - they wrote a pseudo-code examples in Java, a-la SaveRegisters(). It is a madness, Isn't it? ^_^
- points 16y agoWhy madness? It has a clear, logical, consistent and easy to understand syntax.
- c00p3r 16y agoReally? Easier than C syntax, which is a more appropriate in this context, and on which Java's syntax is based upon?
- sid0 16y ago> Really? Easier than C syntax Significantly easier. Think about all those pointers that simply aren't there now. > which is a more appropriate in this context This is a value judgement. The generally nicer semantics (automatic memory management! proper strings!) are also worth a lot.
- points 16y agoWay easier than C syntax. Even though I have long mastered various assembly languages and higher level languages, C pointers and their arithmetic still confuses me. There's nothing worse than something like bar = *[&foo + 88] or whatever it is.
- sid0 16y agoI'm a TA for an OS course that is closely following the Berkeley CS162 course, down to using Java for assignments. We've had much less trouble than with the C++ we used to use.
- c00p3r 16y agoWhy not a plain C which is an obvious choice? I think I know the answer - "because of a buzz". ^_^ And of course, using a VM-hosted language to describe things which are on two levels of abstraction lower is a little bit funny.
- sid0 16y ago> Why not a plain C which is an obvious choice? Because manual memory management is a PITA. > And of course, using a VM-hosted language to describe things which are on two levels of abstraction lower is a little bit funny. Why? As long as you're clear that it's a pedagogical tool, it's perfectly fine. And there are incubation OSes (e.g. Singularity) that are almost entirely managed.
- c00p3r 16y agoWe're talking about simplicity and clarity of language's syntax? Why memory management? btw, to whom memory management is a PITA?
- sid0 16y ago> We're talking about simplicity and clarity of language's syntax? Why memory management? Both the syntax and the semantics are nicer. > btw, to whom memory management is a PITA? To anyone who tries to do it. That automatic memory management is easier to program with than manual memory management is self-evident.