NNTP-Posting-Date: Sat, 18 Jan 2014 02:58:57 -0600 Date: Sat, 18 Jan 2014 08:58:56 +0000 From: lipska the kat Organization: Trollbusters 3 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: What's the best non-JVM native language to look at? References: <428f8206-d4f7-4fe6-b93c-8f881b498be6@googlegroups.com> <99qdnVXamdWBRErPnZ2dnUVZ8mOdnZ2d@bt.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <0aWdncIb3KbM30fPnZ2dnUVZ8qudnZ2d@bt.com> Lines: 52 X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-b0sd88GcT7dFgqOvKwhA3fUPG1FLe5gDazd1SLFhZSlIj2d6bgrdoEh04FFfXpUOZDZ4v/46ecQoPQU!Lq63uMUT9EJDV834MAobxKZmR6W7EAGbB5oQQFQVzKyb2K8rYOqcJOjNPgEU6Sm6o7oDaIvBmNo= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 4175 Path: csiph.com!usenet.pasdenom.info!news.stben.net!border3.nntp.ams.giganews.com!backlog3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail Xref: csiph.com comp.lang.java.programmer:27342 On 18/01/14 07:56, Arved Sandstrom wrote: > On 01/17/2014 05:44 PM, Joshua Cranmer 🐧 wrote: >> On 1/17/2014 12:08 PM, lipska the kat wrote: >>> On 17/01/14 16:28, Joshua Cranmer 🐧 wrote: >>>> On 1/16/2014 7:05 AM, lipska the kat wrote: >>>>> I can't think of a language that isn't ultimately implemented in C. >>>> >>>> Zero-cost exception handling cannot be expressed in (ISO) C code >>>> (or, at >>>> the very least, not in a way that a C compiler will faithfully compile >>>> it--in the situation that would arise, clang and gcc are both extremely >>>> happy to mangle the code, even at -O0). Well, MSVC has __try/__catch, >>>> but that's not ISO C. >>> >>> I've been reading up on this Zero-cost exception handling thing. >>> It seems that while there may be no overhead for exception handlers if >>> no exception is raised, the performance of exception propagation is >>> poor. Maybe it should be called 'Zero-cost exception handling if no >>> exception occurs'. It's not impossible though is it, it's a compiler >>> thing so it *could* be implemented ... if the compiler supported it. >>> It's not a fundamental shortcoming of the language per-se is it? >> >> Zero-cost exception handling simply cannot be expressed in ISO C code. >> In essence, it requires building external unwind tables, which can be >> thought of as "if an exception reaches between these two points, jump to >> that location instead"--which requires some notion of computed goto >> (more specifically, the ability to take the address of a label). gcc's >> computed goto extension is not formally specified, but experimentation >> with both clang and gcc indicate that taking the address of a label and >> not jumping to it [in the same function] is insufficient to preserve the >> existence of the code after that block, even when compiling at -O0. >> >> In general, C strongly believes that there exists only a single entry >> point to every function; constructs where this notion doesn't really >> hold true (exceptions, generators, coroutines, continuations) can't be >> effectively expressed in C code. >> > [SNIP] > > With all due respect, Joshua. :-) Let's not get *too* deep here. I get > that you're a computer scientist, but at this point I think we are > totally not helping with answering the original question. :-) Well possibly but it's slightly more interesting than some obscure discussion on Nordic umlauts or whatever that we recently had to endure in this group :-) -- Lipska the Kat©: Troll hunter, sandbox destroyer, treacherous feline and farscape dreamer of Aeryn Sun GNU/Linux user #560883 - http://www.linuxcounter.net