Newsgroups: comp.arch Path: csiph.com!au2pb.net!feeder.erje.net!2.us.feeder.erje.net!enother.net!enother.net!peer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!kithrup.com!mrs From: mrs@kithrup.com (Mike Stump) Subject: Re: What's Worked in Computer Science Message-ID: Date: Sat, 12 Dec 2015 09:02:11 GMT References: Organization: Kithrup Enterprises, Ld. X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Lines: 24 X-Received-Bytes: 1930 X-Received-Body-CRC: 1711330514 Xref: csiph.com comp.arch:31760 In article , Nick Maclaren wrote: >In article , Mike Stump wrote: >C++ also has compile-time calling conventions, as part of template >handling, but they are unlike anything in Fortran or any compiled >language. Ah, thanks for expounding what you meant. I agree, it isn't a 1 to 1 mapping that can easily go in either direction. Curious thing however, the template stuff from C++ can be faked without too much trouble from C and the entire linkage thing will just work out. One needs to be able to section off the code and mark it up as comdat. We already have a way to section off the code in gcc, so that would just leave comdating it. A single extension, if it wasn't already there. If one wanted to just use the explicit template instantiation model, all the goop you need is already there. But I digress, as doing all of that would kinda be an abomination. Though, I have seen people use cpp to fake very limited forms of templates in C. Now, if you want really, totally incompatible, check out the native go in go system. The internal model they use is so foreign that a compiler in gcc or llvm is gonna take a ton of work to get the bits they use at the bottom, in the model the compilers use. GNU go uses a different (less good) way of skinning the cat to make it work.