T.R | Title | User | Personal Name | Date | Lines |
---|
3117.1 | a little help... | GSRC::WEST | SCARY : A programmer with a screwdriver. | Mon Jul 23 1990 17:16 | 25 |
|
One performance issue is the fact that the DECwindows routines are written
in C. A C program calls routine XMumble directly...for all other languages
including FORTRAN, FORTRAN calls an intermediate routine that in turn calls
the C routine.
This is known as the VAX VMS $ Binding. These routines do things like
append/remove the ASCII null character to/from strings, and address
dereferencing, that are otherwise painful for some languages to do on their
own.
Another issue (maybe) is the difference between the RTL executions of C
over FORTRAN, (i.e. how much work is involved in running a FORTRAN program
compared to running a C program)
Overall, however, I wouldn't think that there would be _that_ big of a
difference in performance. This is based on my experience of writing/re-writing
some common programs in Ada that have C counter-parts and no notice no real
differences in performance.
I know this isn't much but I thought I'd try to help. :^)
-=> Jim <=-
|
3117.2 | | QUARK::LIONEL | Free advice is worth every cent | Mon Jul 23 1990 17:32 | 21 |
| I'm not sure what Jim West is referring to regarding the "RTL executions".
Though it's true that in most cases there is a level of call indirection
when calling the "VAX binding" toolkit routines, I don't think this would
have any noticeable performance impact. If you thought it did, there's
nothing to stop you from using the C bindings - actually, from FORTRAN it's
not hard at all. You'll just have to learn to manipulate null-terminated
strings a bit more (you can't avoid it even with the VAX bindings).
There is no inherent advantage to programming in C for DECwindows. If your
customers are comfortable with FORTRAN, then by all means encourage them
to use it. They may want to consider calling the "C binding" routines
for portability reasons; the data structures from the DEC-supplied
packages are not a problem. The only problem I see is pointers, and these
too can be dealt with in FORTRAN without too much difficulty.
As for overall performance, FORTRAN will generally win over C. Coupled with
the software engineering advantages of FORTRAN (or just about anything else)
over C, the customer's overall development and maintenance costs will be lower
with FORTRAN.
Steve
|
3117.3 | Motif? | OSLACT::OLAV | Do it in parallel! | Wed Jul 25 1990 04:57 | 21 |
| > There is no inherent advantage to programming in C for DECwindows.
C is more used in the world of X programming. It's easier to get support when
doing it in C. Motif has currently support for C *only*. It's a lot easier to
code in C since the toolkit is written in C.
> As for overall performance, FORTRAN will generally win over C.
I think the difference would be marginal. Use the tools that keeps the
development and maintenance costs down. Select a hardware platform that gives
you the performance you need.
> Coupled with the software engineering advantages of FORTRAN (or just about
> anything else) over C, the customer's overall development and maintenance costs
> will be lower with FORTRAN.
I don't see any connection between software engineering advantages and FORTRAN?
Too me it's no better than C. C has a interesting migration into object oriented
programming with C++. What about FORTRAN?
Olav
|
3117.4 | I learned C just to program for DECwindows... | DSSDEV::BIBEAULT | Grizzly Bear | Wed Jul 25 1990 09:39 | 16 |
| >> As for overall performance, FORTRAN will generally win over C.
>
>I think the difference would be marginal.
FORTRAN will *in general* yield slightly better performance than C (I
agree that it'll usually be marginal, and it's not true for ALL cases),
but remember that you pay the price in virtual memory since FORTRAN
pre-allocates everything.
Although I am *not* a fan of C, I'd recommend doing any DECwindows
programming in that language for quite a few reasons. One of the
strongest is the wealth of example programs that exist, mostly written
in C. Countless times I've SEARCHed (grep'd) example source files looking
for an example of how something was done...
-mike
|
3117.5 | | QUARK::LIONEL | Free advice is worth every cent | Wed Jul 25 1990 11:27 | 20 |
| So the argument is "use C because everyone else does"? The information I have
says that much of our customer base is using Ada and FORTRAN more than C
for DECwindows applications.
The only reason there aren't more examples in other languages is that nobody
has bothered to write them. That's why I developed the Ada and FORTRAN
versions of HELLOWORLD and DECBURGER, and the Ada version of XLIBINTRO.
More will be forthcoming.
As for Motif, I am aware that we don't currently have a binding package for
any language but C. If we allow this to continue, we are going to cause our
paying customers untold grief. I'm working behind the scenes on this, and
believe that we'll at least have Ada and FORTRAN bindings for Motif.
Don't let others make choices for you. If you believe strongly in the need
to use high-level languages for DECwindows/Motif applications, make your
desires known to product management. It would be sad if we were forced to
program in C just because we didn't speak up.
Steve
|
3117.6 | | 4GL::VANNOY | Jake VanNoy | Wed Jul 25 1990 18:34 | 4 |
| The actual data I've seen says that the TSC calls are a high
percentage FORTRAN and Ada, but this may only be an indication of the
state of those bindings or a lack of examples in those languages. It
does not necessarily reflect usage.
|
3117.7 | | DSSDEV::BIBEAULT | Grizzly Bear | Thu Jul 26 1990 10:20 | 12 |
| Steve,
> So the argument is "use C because everyone else does"?
Not at all what I said. I'm just a big believer in using the most appropriate
tool for the job. And although I have some serious problems with C as a
language, at least for now it's the easiest to program to DECwindows in.
The originator of this note asked for opinions -- that's mine. You're also
entitled to yours. It's now up to him to weigh these opinions against his
situation...
-mike
|
3117.8 | | SMAUG::MENDEL | In some strange power's employ | Thu Jul 26 1990 14:46 | 27 |
| >>> > So the argument is "use C because everyone else does"?
>>>
>>> Not at all what I said. I'm just a big believer in using the most appropriate
>>> tool for the job. And although I have some serious problems with C as a
>>> language, at least for now it's the easiest to program to DECwindows in.
But that's what it boils down to.
Use C because it is the easiest language to program to DECwindows in.
C is the easiest language, because the X code was written in C, because
the X developers used C.
C is the easiest language, because the DwT code was written in C,
because the DwT developers used C.
C is the easiest language, because the examples are mostly in C, because
the example creators used C.
Therefore, C is the easiest language for DECwindows because everyone
uses C.
Therefore, you should use C because everyone uses C.
QED.
Kevin
|
3117.9 | What about macro? | H2SO4::GERSBACH | Edwin Gersbach CS Switzerland | Fri Jul 27 1990 10:13 | 16 |
| Re .8
>>> But that's what it boils down to.
Yes indeed, and because most of VMS is written in macro we should use use macro
to write our applications. What a lot of people forget is that C is the
assembler of UNIX, and because operating systems are usually written using
assemblers does not mean that this is also useful for applications. C is, and
always was, a low level language, intended to write operating systems, drivers
and similar tasks.
Also, it is a well known fact that the overall development time for applications
is significantly higher when using C than using a structured high level language
such as ADA or Pascal.
Edwin
|
3117.10 | | PSW::WINALSKI | Careful with that VAX, Eugene | Fri Jul 27 1990 16:47 | 4 |
| Can we please take the "merits and demerits of various programming languages"
debate to the LANGUAGES conference and get back to talking about DECwindows?
--PSW
|
3117.11 | TO PORT OR NOT TO PORT...THAT IS THE QUESTION | CSCOA3::HOOD_DO | | Fri Aug 03 1990 10:38 | 14 |
|
Okay.... there is no clear consensus that programming in C yields
any significant advantage in the VAX/VMS arena. I can tell you that
if you want to port to Ultrix (and possibly many other Unix platforms),
the port will be easier of the program was written in C. If your
customer will ALWAYS run the program on VMS only, choose what is
easiest for them to program in. (As an excercise in futility, try
getting documentation/examples/etc. of DECwindows programs written
in Fortran for Ultrix. All you get is a blurb about jacket routines
and their compilers.... the rest is up to you).
DH
|