Prev: Symbolic tracebacks on Debian (Was: About static libraries and Debian policy)
Next: Gnat cross compiler
From: Yannick Duchêne (Hibou57) on 25 May 2010 14:16 Le Tue, 25 May 2010 19:42:48 +0200, Ludovic Brenta <ludovic(a)ludovic-brenta.org> a écrit: > Dmitry A. Kazakov writes on comp.lang.ada: >> P.S. I bet Ada is better for writing a C compiler than C. > > I don't think so; human factors would get in the way. A programmer > proficient in Ada might start doing this but would eventually give up > and write a Pascal compiler instead :) For the news and as an anecdote : C is rising up again (due to embedded systems quickly rising every where), while C++ is slightly decreasing (for the same reason C is rising again, C++ is decreasing), and the Pascal usenet group is closed. So... not sure. -- There is even better than a pragma Assert: a SPARK --# check.
From: J-P. Rosen on 25 May 2010 14:16 Dmitry A. Kazakov a �crit : >> In most programming languages, there is a relation between the structure >> of the language itself and the kind of data it handles best. For this >> reason, and others like ease of porting, it is generally a good idea to >> write the compiler in its own language, safe for special cases like >> initial bootstrapping. > > I don't think this is true. I said "in most programming languages..." > > 1. Theoretically there is no obvious connection between the language and > the things it describes. The word "red" is not red. English grammar is not > influenced by Maxwell's equations, etc. [*] I was talking about computer languages. > 2. Practically, is there any SQL parser written in SQL? OK, that's an exception. > The languages in which a compiler can be written are in minority. Maybe more than you think. C compilers are in C, I wouldn't be surprised if C++ compilers were in C++ and PL/1 compilers in PL/1. Most Ada compilers are in Ada; I once knew a Lisp compiler in Lisp, and of course there is someone who swears that Cobol is a great language for writing Cobol compilers ;-). Hint: he wrote one of the best Cobol compilers for the PC - in Cobol. -- --------------------------------------------------------- J-P. Rosen (rosen(a)adalog.fr) Visit Adalog's web site at http://www.adalog.fr
From: Yannick Duchêne (Hibou57) on 25 May 2010 14:28 Le Tue, 25 May 2010 18:24:31 +0200, Nomen Nescio <nobody(a)dizum.com> a écrit: > It depends much on the platform. On UNIX, everything was unquestionably > written in C, on IBM, unquestionably in assembler. Other platforms, I > don't know. At least, the Windows ABI is a C ABI, except for calling convention, which use the âinvoked/callee clean the stackâ of Pascal and the âparameters pushed right to leftâ of C (the calling convention defined by the Windows 32 ABI is a funny mix). -- There is even better than a pragma Assert: a SPARK --# check.
From: Warren on 25 May 2010 14:50 =?iso-8859-15?Q?Yannick_Duch=EAne_=28Hibou57=29?= expounded in news:op.vc9u6lo2xmjfy8(a)garhos: > Le Tue, 25 May 2010 11:05:06 +0200, Dmitry A. Kazakov > <mailbox(a)dmitry-kazakov.de> a �crit: >> People are bad, they were created to kill, steal, become obese and > >> program >> in C. You cannot change that. > Seems obvious this activity cannot be ripped apart the rest of the > world/humanity. I don't know, but I think ppl tend to forget about the things that influence choice (since that is really what we are talking about). No one as a developer would say that he likes to "choose inferior tools". He'll simply challenge what is best or inferior. And when discussing "best", one will not arrive at a single answer anyway because so many other factors must also be considered. So by no means is this an exhaustive list of influences: - ignorance (ppl don't embrace what they don't know) - laziness (even when informed about it, no energy spent to give an honest consideration). - perception (it can be perceived as old/bloated/military whatever) - personal stake (why learn something with no local job market) - resistance to compiler errors (many folks seem happier to debug instead). - interface ease (the need to be good at writing bindings to C/C++) - library/tools support (the quantity and quality of) - crowd thinking (many not willing to defend an unpopular choice) and probably much much more. None of these really have much to do with Ada as technology per se. Most of this (I think) is about popular perception. Even the magazine writers, who should be more knowledgable, tend to cast Ada in a negative light (as a "bloated language" etc.). Or sometimes they confuse it with something else (like perhaps "full PL/I"). This tends to reinforce the misconceptions. Warren
From: John B. Matthews on 25 May 2010 15:50
In article <op.vc9xlkncule2fv(a)garhos>, Yannick Duchêne (Hibou57) <yannick_duchene(a)yahoo.fr> wrote: > Le Tue, 25 May 2010 18:24:31 +0200, Nomen Nescio <nobody(a)dizum.com> a > écrit: > > It depends much on the platform. On UNIX, everything was > > unquestionably written in C, on IBM, unquestionably in assembler. > > Other platforms, I don't know. > At least, the Windows ABI is a C ABI, except for calling convention, > which use the “invoked/callee clean the stack” of Pascal and the > “parameters pushed right to left” of C (the calling convention > defined by the Windows 32 ABI is a funny mix). Early versions of Windows [1] may have been influenced by an association with Apple's original Macintosh OS, which specified Pascal calling conventions [2] in the API, "Inside Macintosh" [3]. Bindings for an early version of GNAT on Mac OS 9 were translated from the corresponding Pascal interface specifications [4]. [1]<http://en.wikipedia.org/wiki/History_of_Microsoft_Windows> [2]<http://www.mactech.com/articles/mactech/Vol.05/05.03/ToolboxfromAda/index.html> [3]<http://en.wikipedia.org/wiki/Inside_Macintosh> [4]<http://home.roadrunner.com/~jbmatthews/ada.html> -- John B. Matthews trashgod at gmail dot com <http://sites.google.com/site/drjohnbmatthews> |