On Wed, Feb 2, 2011 at 10:21 AM, erik quanstrom wrote: > > A runtime system is just a library whose entry points are language > > keywords.[1] In go, dynamic allocation, threads, channels, etc. are > > accessed via language features, so the libraries that implement those > > things are considered part of the RTS. That's a terminological > > difference only from Plan 9 C, which has the same features[2] but > > accesses them through ordinary library entry points so the libraries > > that implement them aren't called `runtimes'. But I think complaining > > about a library only because its entry point is a keyword is kind of > > silly. > > i think this glosses over a key difference. a runtime can do things > that are not invoked by function call. the canonical example is > garbage collection. > > - erik > > An excellent example would also be the scheduling of goroutines. I do not believe there's anything in the language specification that says that goroutines could not one day be pre-emptive. Also, from this point of view, could pthreads be considered runtime for C? Depends on the implementation I suppose. You've got thread local storage, which is not handled by any explicit C code, but by a coordinated effort between the kernel and the pthreads library. So the kernel is a C runtime too :-). Dave