Find the answer to your Linux question:
Page 3 of 3 FirstFirst 1 2 3
Results 21 to 24 of 24
Alot of languages have similar concepts just different ways of implementing them. Choosing a new language shouldn't be too hard, just choose one that does what you want it to. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #21
    Linux Guru bryansmith's Avatar
    Join Date
    Nov 2004
    Location
    /Ontario/Canada
    Posts
    2,619

    Alot of languages have similar concepts just different ways of implementing them. Choosing a new language shouldn't be too hard, just choose one that does what you want it to.

    Bryan
    Looking for a distro? Look here.
    "There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
    Queen's University - Arts and Science 2008 (Sociology)
    Registered Linux User #386147.

  2. #22
    Just Joined!
    Join Date
    Feb 2005
    Location
    between a cup of tea and a cup of no tea
    Posts
    16
    I think it comes down, as well, to what you want to do with the language. Do you want to write applications that you will use or distribute? Do you want to h4xx0r some hardware? Do you want to automate tasks you find repetetive?

    One thing I haven't seen answered is the difference between compiled and scripting languages.

    Just so you understand, a computer only talks zeros and ones. That's it. Either a register is open or closed.

    You can specifically tell a computer how to do something by writing in low-level machine language. A way of abstracting that machine language is by using what's called, Assembler. Here's an example of what assembler looks like:

    Code:
    mov ax,cs
    mov ds,ax
    mov ah,9
    mov dx, offset Hello
    int 21h
    xor ax,ax
    int 21h
    
    Hello:
      db "Hello World!",13,10,"$"
    That bit of gobblygook simply moves a small portion of text into a running stack of memory and displays, Hello World.

    Most applications written by commercial ventures are done in a slightly more abstract language, where you're not actually telling the computer what to do with teh memory. C and C++ fall into these categories. You write the code and run it through a compiler. The compiler translates your code into machine language (similar to above) for execution.

    An example would be

    Code:
    #include <iostream.h>
    
    main&#40;&#41;
    &#123;
        cout << "Hello World!" << endl;
        return 0;
    &#125;
    in this case, the compiler handles the memory addressing and other issues. You just write and compile. You still need to set a whole bunch of parameters, but the compiler will alert you if anything is wrong. This level is considered the fastest with a reletively speedy develompent curve.

    The next level of code is pure script. This form of code is never compiled and has to be parsed through a "runtime" prior to each use. The programmer has no idea about memory addressing or what is going on behind the scenes. This type is the easiest to code but provides the least amount of control. It is also the "slowest" to execute, since the processor must translate the code each time it is run.

    Here's an example in BASIC, which is what I learned first back in '79.

    Code:
    PRINT "Hello World!"
    END
    Notice the code is getting much shorter? That's because there is nothing for me to worry about with the system. It will just run when I envoke the script.

    Now, people wanted a sort of middle ground between pure compiled code and script code. Thus VB, Java, and .NET (Mono, C#...) were invented.

    In each of these instances, code is written in a somewhat natural language syntax. The code is partially compiled, but only to a byte level. It is not yet machine code. When the program is executed, the machine runs the code through a runtime engine which either compiles it further or uses a cached version of the compiled code.

    Here is an example of Java, which I'm learning right now:

    Code:
    class HelloWorld &#123;
      static public void main&#40; String args&#91;&#93; &#41; &#123;
        System.out.println&#40; "Hello World!" &#41;;
      &#125;
    &#125;
    This class of programming languages is suitable for large-scale deployment because it has become very fast. It is considered to be as fast - particularly for GUI applications which require human intervention - as C/C++ applicaitons. This is because the code is compiled to a binary format and may even be cached as machine language by the system after it has been run the first time.

    I hope that helps you out! The cool thing about coding is that - once you're done - you can run your app and make the computer do stuff.

  3. #23
    Just Joined!
    Join Date
    Apr 2005
    Posts
    40
    a lot of thanks Perfect Reign
    really it helped me and i'll try to make the first step in (a middle ground between pure compiled code and script code ) by choosing beween them .

    maybe i have to read a bit for each one

  4. #24
    Just Joined!
    Join Date
    Feb 2005
    Location
    Delft, Holland
    Posts
    95
    Why not LISP, most cs classes take LISP as an introduction to programming, as it is very easy and very powerful
    It's an intepreted style of languages, although it can also be compiled.

    Code:
    &#40;DEFUN my_function &#40;&#41;
      &#40;FORMAT T "Hello World!"&#41;&#41;
    The Fibonacci function,
    where the fib of n is the fib of n - 1 plus the fib of n - 2.
    And the fib of anything below 2 is equal to 1.

    Code:
    &#40;DEFUN fibonacci &#40;n&#41;
      &#40;COND &#40;&#40;< n 2&#41; 1&#41;
            &#40;T &#40;+ &#40;fibonacci &#40;- n 1&#41;&#41;
                  &#40;fibonacci &#40;- n 2&#41;&#41;&#41;&#41;&#41;&#41;

Page 3 of 3 FirstFirst 1 2 3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •