What programming language do you use

Discussion in 'Computer Science & Culture' started by eyng7623, Apr 22, 2011.

Thread Status:
Not open for further replies.
  1. John99 Banned Banned

    Messages:
    22,046
    I started with C (old borland compilier on a 386\486) and VB, i think arouns 5.0. Now i use C++ ans a few others depending on my output may be more exclusive to one particular system.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Dinosaur Rational Skeptic Valued Senior Member

    Messages:
    4,885
    Chipz: I just did a bit of research on Fortran 90. No wonder you think it is a good language. It has added a lot of Algol & Pl/1 syntax to improve the Fortran I used in my mainframe days.

    As I suggested in an earlier post, you probably do not know much (if anything) about Pl/1, which had constructs like Select Case 40 years ago. Algol had such constructs circa 1960. Both Algol & Pl/1 had scope of variables & block structuring long before other languages had these features essential to good programming. Fortran had none of the good features of Algol & Pl/1 until the late 1980's.

    Does Fortran 90 have scope of variables? My Web search did turn up any description which mentioned this feature.

    BTW: Pl/1 was a not bad plagarism of Algol, which was a slightly better language.

    COBL & Fortran were widely used in the mainframe era for non technical reasons. IBM Marketing superiority made Fortran popular in spite of its being obvious inferior to either Algol or PL/1. The US government pushed the development of COBOL & declared that it would not purchase any computer which did not provide COBOL.

    BTW: I was on the Codasyl committee which designed the original COBOL language. The committee consisted of about 30 members: One from each of about 10-12 computer manufacturers, a few government representatives, and one from each of the larger commercial users of computers.

    The government reepresentatives were bureacrats who knew little about any type of programming & nothing about programming languages. The rest of us all agreed that any 2-4 of us could have done a better job than the committee. We all were ashamed of the initial COBOL we designed & never thought much of its successors.
     
  4. Google AdSense Guest Advertisement



    to hide all adverts.
  5. Chipz Banned Banned

    Messages:
    838
    Block structuring in Fortran is broken up into Programs, Subprograms, Modules, Subroutines and functions. Each one has its specific scoping properties. Functions I believe with the tightest scope and subroutines are the most open. I believe more than half of them have been available since 1958 and all of them since 1961. It encourages this modular break up style of programming. It seems annoying, but it greatly improves memory allocation since it's known that memory addresses won't change for the duration of a block, and therefore once register / assigned they are not checked from cache.

    From what I know of Algol, it's more in the vein of C than Fortran. If that's better or worse, eh? Who knows? But what's sure is Fortran is still the fastest language.

    Fortran was used because it was the best raw-speed programming language with the least over-head. This was extremely important for older computers. It's still (as a result of this) the fastest raw number calculation tool out there. Although, I've found some C++ meta-template programming can shift burdens to compile time and it will out perform any other language -- Although advantages are trivial.

    Cobol I am not familiar with -- I have never worked within a business environment.

    ---

    That all said, I may have misrepresented my position and for a moment forgot how old some of the people on the board are. I guess some people here were around when Pl/I made sense to use. I typically program in 3 main languages, C++ mixed with C & Fortran. And Python. Fortran I typically only use for very very intensive sections.
     
  6. Google AdSense Guest Advertisement



    to hide all adverts.
  7. Dinosaur Rational Skeptic Valued Senior Member

    Messages:
    4,885
    ChipZ: The following are assertions which do not seem close to being valid. Do you have some citations to support your opinions?
    Block structuring in Fortran is broken up into Programs, Subprograms, Modules, Subroutines and functions. Each one has its specific scoping properties. Functions I believe with the tightest scope and subroutines are the most open. I believe more than half of them have been available since 1958 and all of them since 1961. It encourages this modular break up style of programming.

    The above related to my mentioning scope of variables, which neither COBOL nor Fortran had in the first 20-25 years of the mainfame era (and might not have yet)

    If you think that Fortran had scope of variables since 1961, you do not know what the term means. Also: Fortran did ot have Block Structuring prior to 1975-1985 (& I have no reason to believe it ever had it in the mainframe era).

    for large datasets there's nothing better than Fortran

    What makes you think that Fortran is at the top of the heap for dealing with large data sets?

    But I can say pretty assuredly, the answer is NEVER, NEVER, Visual Basic.

    What is so bad about Visual Basic? It is far easier to learn than the various C dialects. I was able to hack it on my own with no tutorials or manuals. It has overloaded functions, OOP, & other modern structured programming features. It is excellent for event-driven applications (as are most, perhaps all, of the .net languages). It produces code which is slower than various C dialects, but not slow enough to be noticed in most Windows applications. Does Fortran 90 have any of the features required for developing OOP and/or Windows-type applications? Visual Basic.net can initiate threads (useful on multi-core systems), Can Fortran 90 do likewise? I am sure that other .net compiers can.

    I'm addicted to efficiency. For efficiency data handling you go with C or Fortran... Pl/1 might have made some sense before Fortran 90, but doesn't make any sense today.

    As far as I can tell, both Fortran & Pl/1 are obsolete in modern times. Various C dialect compilers are generally considered to produce code almost as efficient as assembler & faster than other high level languages. Unless the modern Pl/1 compilers have not kept up to the state of the art, I would be surprised if they are slower than Fortran 90.

    Fortran was used because it was the best raw-speed programming language with the least over-head. This was extremely important for older computers.

    In the days of slow computers, Fortran-compiled programs were no faster than Algol & Pl/1 programs, while Algol/ Pl/1 provided features which made program development faster & easier for the programmers. In those days, Algol-compiled programs were faster than either Fortran or Pl/1 programs when running on a Stack-Architecture system (Algol was designed for such systems).​
    BTW: Modern computers are so fast that there are very few applications requiring extreme speed. Weather forcasting and simulations of complex systems are about the only applications I can think of offhand which require ultrafast programs. If a program does the job in a minute to 12 hours, does it matter if some other program can do it in 10% less time?

    The views you have expressed tend to make me wonder how much programming knowledge/experience you have. In particular, I do not think you know much about Pl/1 other than its name. Can you provide some citations validating your views?
     
  8. Chipz Banned Banned

    Messages:
    838
    Sounds like you're being argumentative, but I will answer in good faith.



    I can say the first Fortran standard (F66) contained the aforementioned blocks for sure. What you're referring to by scopes is automatic allocation/de-allocation within a scope. But in reality variables allocated within a block scope in F66 were in accessible outside of some blocks (say functions). Today, since F90 the allocation of temporary variables within a local block clean up themselves. The modular structure encouraged scoping.

    The fact that it proves the best in every benchmark -- and that's what it's designed to do.

    I already answered when I use Fortran at the latter half of last post.

    Which one? Here are some stats: http://shootout.alioth.debian.org/u64q/fortran.php

    I contribute to: http://www.wrf-model.org/index.php
    and program circuit simulators. I have contributions here --> http://redmine.gnucapplus.org/

    The idea of "so what if it's a little slower" is a very prevalent philosophy today. It's a valid sentiment in most cases, and many of the software developers are moving this direction. Towards software with garbage collection. When I don't need speed --- I don't you C/Fortran. When I need very quick development, I use PyQt.
     
  9. Dinosaur Rational Skeptic Valued Senior Member

    Messages:
    4,885
    Chipz: You seem to be correct about Modern Fortran being a speed demon. Historically it was not & I am a dinosaur. I apologize for that.

    I still doubt that Fortran has any advantages relating to large data sets, which are more dependent on hardware features than on compiler syntax.

    BTW: I might also be wrong about when Fortran introduced scope of variables ala Algol, which was the first language to do so

    Algol was originally designed for use in describing computer-independent algorithms in various journals (primarily the ACM journal). It was used by programmers who coded the algorithms using assemblers & languages implemented as true compilers. The Burroughs Corporation (where I worked from 1955 to 1962) was the first to implement an Algol compiler in 1960.

    I was not able to find a reference indicating when Fortran included scope of variables, but I did find the following in an article
    Algol was the first compiler to implement scope of variables in 1960. Various other languages introduced this important feature soon after Algol​
    The above suggests that Fortran might have had it sooner than I thought.

    BTW: IBM created PL/1 because Fortran did not have enough structured programming syntax (EG: Select Case statements & While/Until). This caused overuse of GOTO statements which result in spagetti code, difficult to debug & difficult to understand. They could have implemented an Algol compiler, but did not do so for marketing reasons (Id est: It would make Burroughs look good).

    I developed a hatred for Fortran due to once having a consultant job which required me to debug and upgrade Fortran programs which were abominations due to the over use of GOTO’s & the lack of good structured programming syntax. The company had to call in several consultants because their programming staff had made some bad messes. The Fortran source was incredibly difficult to understand.

    Mediocre programmers do not make such messes using languages like Algol, PL/1, & Pascal, which have variable scope, some good structured syntax, & strong typing of variables.

    On other occasions I had to work with code written by poor programmers using PL/1 & Pascal. That code was not so difficult to understand, although the Pascal was difficult for me due to its being an unfamilar language at the time. I never learned it well enough to do a good job of writing original programs rather than fixing source code written by others.

    Once again, my apologies for misjudging you & the virtues of modern Fortran.

    I still consider Visual Basic an excellent language for developing Windows applications in an event-driven environment.
     
  10. Wisdom_Seeker Speaker of my truth Valued Senior Member

    Messages:
    2,184

    Please Register or Log in to view the hidden image!

    what have you written in XAML?
     
  11. Chipz Banned Banned

    Messages:
    838
    So today I was programming and realized why C++ is so much better than most any other language. I found that I needed an overloaded non-static member function with pointer functions as variables with variable return types, and not only does C++ have them, but just basic C does as well : ). I guess C# has delegates which accomplish almost the same thing (not quite). I can't imagine any other language where such a thing is available.
     
  12. przyk squishy Valued Senior Member

    Messages:
    3,203
    Er, maybe I'm missing something, but it doesn't sound like you're describing anything that couldn't be done in pretty much any functional language with dynamic typing (Python, Ruby, Lisp, Lua, ...). Functions are first class objects in all of these languages so you can assign them to variables, put them in arrays, pass them around as arguments to functions, return them from functions, etc. For example, here's how you define a function that returns the sum of two functions in Python:
    Code:
    def addfunctions(f, g):
        return lambda x: f(x) + g(x)
    
    Same thing in Lisp:
    Code:
    (defun add-functions (f g)
      (lambda (x) (+ (funcall f x) (funcall g x))))
    
    This sort of thing isn't even possible in C (unless you're willing to experiment with runtime code generation). In C++ you might be able to get the same sort of functionality with function objects, but it'd take a language lawyer to get it to work safely.
     
  13. Chipz Banned Banned

    Messages:
    838
    Off of the top of my head (away from my dev computer, I think this is it)

    Also from the top of my head-head. Python doesn't support the method overloading unless you emulate its vtable calls (which isn't real overloading) nor does it have a void (or) a union data type. Therefore it can't do what I stated.

    Lisp might be able to, not sure... I would guess it could since everything is treated pretty strictly as a 'symbol'.

    Code:
    int SomeClass::replacement_funx(int a, int b)
    {	// do something
            return a + b;
    }
    
    int SomeClass::replacement_funx2(int a, int b)
    {	// do something different
           return a - b;
    }
    
    int SomeClass::activator(void (*lisper)(int, int))
    {
    	int a = 0, b=1;
    	return (this->*lisper)(a, b);
    }
    
    int SomeClass::WorkingMethod()
    {
            SomeClass::void (*some_funx)(int, int);
    	if (/* some conditions */)
    		some_funx = &replacement_funx ;
    	else
    		some_funx = &replacement_funx2;
    
            return activator(some_funx);
    }
    
    -- Just remove the class stuff for it to work in C.
     
    Last edited: May 18, 2011
  14. przyk squishy Valued Senior Member

    Messages:
    3,203
    Well then I'm a bit mystified by what you said, because plain C doesn't support function overloading either. You can't define two functions with the same name in C. It doesn't have member functions either (because it doesn't support C++ type classes) for that matter.

    Er, what is this supposed to do? It can't be an example of the sort of thing you're trying to do, because it transliterates quite easily into Python. It doesn't accomplish what the example Python and Lisp code I posted does either.
     
  15. firdroirich A friend of The Friends Registered Senior Member

    Messages:
    565
    In order of use:

    Java
    C
    C#
    SQL
    VB
    Python
     
Thread Status:
Not open for further replies.

Share This Page