From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <208248d7852a5113dfc9b23cac0d2885@brasstown.quanstro.net> References: <86ipx4s36p.fsf@cmarib.ramside> <86ei7ry76s.fsf@cmarib.ramside> <86zkqf46vz.fsf@cmarib.ramside> <86mxmfuiep.fsf_-_@cmarib.ramside> <1296670548.17627.24.camel@jcast-desktop> <208248d7852a5113dfc9b23cac0d2885@brasstown.quanstro.net> Date: Wed, 2 Feb 2011 10:36:40 -0800 Message-ID: From: David Leimbach To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=001636ef0cea17bbfb049b50ee8f Subject: Re: [9fans] Modern development language for Plan 9, WAS: Re: RESOLVED: recoving important header file rudely Topicbox-Message-UUID: a8834334-ead6-11e9-9d60-3106f5b1d025 --001636ef0cea17bbfb049b50ee8f Content-Type: text/plain; charset=ISO-8859-1 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 --001636ef0cea17bbfb049b50ee8f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Wed, Feb 2, 2011 at 10:21 AM, erik qu= anstrom <quan= stro@quanstro.net> wrote:
> A runtime system is just a library whose entry point= s are language
> keywords.[1] =A0In go, dynamic allocation, threads, channels, etc. are=
> accessed via language features, so the libraries that implement those<= br> > things are considered part of the RTS. =A0That's a terminological<= br> > 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'. =A0But I think c= omplaining
> about a library only because its entry point is a keyword is kind of > silly.

i think this glosses over a key difference. =A0a runtime can do thing= s
that are not invoked by function call. =A0the canonical example is
garbage collection.

- erik

An excellent example would also be the scheduling= of goroutines. =A0 I do not believe there's anything in the language s= pecification that says that goroutines could not one day be pre-emptive.
Also, from this point of view, could pthreads be considered = runtime for C? =A0Depends on the implementation I suppose. =A0You've go= t thread local storage, which is not handled by any explicit C code, but by= a coordinated effort between the kernel and the pthreads library. =A0So th= e kernel is a C runtime too :-).

Dave
--001636ef0cea17bbfb049b50ee8f--