Programming project

Matthew Tuck matty@box.net.au
Mon, 24 Aug 1998 20:33:14 +0930


This message is forwarded from Tanton Gibbs who accidentally sent to me
rather than the list and didn't have a copy.

***

Subject: Re: Programming project
Date:    Wed, 19 Aug 1998 19:36:44 PDT
From:    "Tanton Gibbs" <thgibbs@hotmail.com>

I'm going to send a number of comments on your posted messages, so get 
ready!! :)

(a) Any quirks/(dis)likes/interesting features of programming
languages.  Don't just accept that that's the way it is.
   A strongly typed language is a must.  For scripting languages like
Perl and JavaScript, weak types are ok and beneficial, but for a heavy
duty programming language, strong types help prevent many errors.
   Another problem with many programming languages(including Perl) is 
that they try to please everybody.  I'm more in favor of a RISC like 
programming language that provides a complete yet minimal set of 
instructions.  Don't get me wrong.  I include += -= and so forth as 
complete as well as for, while, do, etc...  The minimal part comes in 
where there is 5 ways to write a do while loop, etc...  You don't need 
repeat-until if you have do-while.  
   Functional programing languages( like LISP ) were designed to provide 
a uniform approach to programing( just use Parenthesis!! ).  I feel that 
this was a good idea, but taken to extremes.  I think a better idea is 
that if constructs are similar, they should look similar, if different, 
then they should look different.  In that way, the looping statements of 
C++ should look more like
  loop( int x = 0; x < y; x++ )  // this is a for loop
  ...
  endLoop;

  loop( x < y )  // this is a while loop
  ...
  endLoop;

  loop  // this is a do while loop
  ...
  endLoop( x < y );

  In this way, the looping constructs look similar and there is less for 
the programmer to have to remember.  I am not advocating this for our 
programming language, but instead just pointing out the merger of 
functional ideas with procedural ones.

Another member wrote
>I despise contrived complexity. Programming languages should make 
>simple
>tasks simple, and more complicated tasks more complicated. 

I don't believe this is quite true.  I think that more complicated tasks 
should be just as simple as simple tasks.  However, that can only be 
achieved by using libraries that other people have written.  The 
integration of libraries and user code must be an important and well 
designed feature of this language.

(b) Language wars (which is best) can tend to become heated, but I think
they should be at least an issue on this list.  Which languages you know
do you like and dislike, any why?

  I don't like Java because it forces you to program in one paradigm.  
Even if it is an object oriented one, the notion that I "have" to do 
things a particular way upsets me.  I'm a big fan of C and C++ 
especially.  I think that there are a number of things that could be 
improved, but for the most part, I enjoy the languages. 

  As for string handling, I enjoy the way C does string handling( much 
to the chagrin of the other members :)  The problem with built in string 
handling is that it is too restrictive.  Lets look at two alternatives
  String s;
First, what does this do?  Is it like Pascal and take up 256 characters, 
or is it more like the string class in C++ and dynamic.  If it takes up 
256 characters and the string is "HI", then there is a severe memory 
loss, enough to make the language not practical for embedded systems and 
many other memory critical areas.  On the other hand, dynamic allocation 
is much slower and will require a lot of compiler overhead and is often 
Machine dependent.  Furthermore, which memory allocation scheme should 
we use since most schemes don't work for everyone.  Either way it is a 
mess.  The C++ alternative provides a clean way to create a string that 
can be extended by classes to provide a nice solution.

(c) Any suggestions for improving programming languages that you 
mighthave.

  C++ does not need the C preprocessor.  An import statement similar to 
Java would be nice.
  Languages need to have a full array of features to make them complete, 
including multiple inheritance.  A feature should not be taken out of a 
programming language just becuase one use could misuse it, we should 
create a language that is easy to use, yet not idiot proof.  We should 
expect competence from our programmers.

Someone also wrote
>It's a case in point in what happens when you take a language and 
>modify
>it over and over again - it turns out a mess, through the necessity >to
>be backwards compatible with previous versions.

I agree with this totally, and that is what is wrong with many things, 
not just programming languages( Win95 for instance ).

As far as the back end goes, I believe we should create a back end for 
the JVM as well as C.  Both are good choices and even Java can be 
compiled to Machine code if you know the target platform.  Therefore, if 
we do all our optimizations on an independent intermediate code level we 
could easily write to both JVM and C at the users discretion.

One problem with compiling to C is that it doesn't have enough
features.  
We would have to extend the C language to allow for things like 
exception handling for example( which caused the extinction of the 
orignal C-Front C++ compiler ).

Now for Basic.  One member wrote that the 1.5 M DLL for a program is 
unsatisfactory, and for one program I agree.  However, any program 
created in VB uses only one DLL, the same one!  So all programs are in 
effect reduced by 1.5 Megs.  Delphi on the other hand can produce 
programs that don't require the DLL, but they are larger.  It is a 
quantity-space tradeoff.  If you are developing 100 apps, VB would 
probably be better.  One app, you should go with Delphi.

(d) A brief propaganda campaign on who you are.
  I'm a senior Computer Science major at Harding University.  I'll be 
starting my Doctoral program in either Language Design or Compiler 
Design next year.

Ok, well, I guess that is enough rambling for now.  Hope I threw in 
enough ideas to get someone stirred up!

Tanton