From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1108a1,d275ffeffdf83655 X-Google-Attributes: gid1108a1,public X-Google-Thread: 101b33,d275ffeffdf83655 X-Google-Attributes: gid101b33,public X-Google-Thread: 103376,d275ffeffdf83655 X-Google-Attributes: gid103376,public From: Dave Whipp Subject: Re: Ada vs C++ vs Java Date: 1999/01/14 Message-ID: <369DE112.B0078B41@hl.siemens.de>#1/1 X-Deja-AN: 432515150 Content-Transfer-Encoding: 7bit References: <369C1F31.AE5AF7EF@concentric.net> <369CF85A.B108ACA8@pobox.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Siemens AG, HL DC PE MC Mime-Version: 1.0 Newsgroups: comp.lang.ada,comp.java.advocacy,comp.object Date: 1999-01-14T00:00:00+00:00 List-Id: Ralph Cook wrote: > > >- support parallel programming > > > > I'm not sure exactly what you mean by that. You mean multi-processor > > support? Threads? Those are OS constructs, but of course the Language has > > to be able to handle them (VB for instance doesn't do a good job of that). > > I like Java's standard constructs for threads, if that meets your case. I find Java's thread support a bit like C's memory management support. i.e. you have to do it yourself using primitives supplied in the library (using the runnable interface and the thread class). Languages like Ada (or Occam, or various others) provide more complete support for parallelism. The programmer just uses the appropriate block declaration. If you look at hardware description languages (e.g. VHDL or Verilog) then parallelism is the default: sequential operations are either inferred through data dependencies or are explicitly programmed. When an RTL architecture is used, a synthesis tool can be used with a constraints file to optimise the speed/space tradeoffs for an implementation. A few software languages do the same. For example, the language used with the Shlaer-Mellor method uses an asynchronous execution model. There is no stack, (nor functions/procedures). Processes can execute in parallel unless constrained. When you use a language like this, you need to use techniques like those of aspect-oriented-programming to constrain an implementation to a specific thread model. (SM uses the term 'architecture' for this aspect) There are very few mainstream langauges that have comprehensive support for parallism. Ada probably comes closest. Languages like C++ or Java are able to interact with an OS (or the VM) to allow threading; but they don't, themselves, support it. Dave. -- Dave Whipp, Siemens AG: HL DC PE MC, MchM, Munich, Germany mailto:David.Whipp@hl.Siemens.de Phone. +49 89 636 83743 Opinions are my own. Factual statements may be in error.