Thread: Language - When To Use What?

  1. #16
    Registered User
    Join Date
    Jul 2006
    Posts
    5
    That was funny, Salem.

    Thank you to all for the help. I shall continue learning C and give Perl a go, and try and really learn programming. Then I shall expand my knowledge in to other areas and languages.

    EDIT: I just looked back and saw your post CornedBee. Also very informative.
    Last edited by tjinr; 07-27-2006 at 03:00 PM.

  2. #17
    Registered User
    Join Date
    Aug 2002
    Location
    Hermosa Beach, CA
    Posts
    446
    re: the python whitespace issue. I like the fact that it's significant. It enforces good style. In c/c++, your co-workers can format their code just about any way they want (and they usually do), and will claim that it's no big deal because it still compiles. In python, everyone is forced to format code in a way that is readable and maintainable for all.

    re: why java over c++: because java has much more in the way of built in libraries, for threading and network code to name just a few. And memory management is taken care of by the langauge, which for the average programmer (or more to the point, for the average programming team), results in more solid code.
    The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.

  3. #18
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >In c/c++
    There's no such language.

    >your co-workers can format their code just about any way they want
    Very unlikely. I have yet to encounter a company that doesn't have house style guidelines. In fact, most of the places I've worked encourage such strict styles that the phrase "you shouldn't know who wrote it" pops up often. Of course, that's silly since you can figure out the author just by looking at the solution they chose and how they organized it, but the actual code style is uniform.

    >and will claim that it's no big deal because it still compiles
    The field has tightened up to the point where you can't be a retard and earn a fat paycheck as a code monkey anymore. So a lot of those people have moved on, fortunately.
    My best code is written with the delete key.

  4. #19
    Dump Truck Internet valis's Avatar
    Join Date
    Jul 2005
    Posts
    357
    I would use C if I were programming linux.
    I would use python if I were programming emerge or needed a quick script.
    I would use erlang if I were programming phone switches.
    I would use java or C# if I needed a large backend for a website.
    I would use php if I created a website.
    I would use io if I needed an embedded language.
    I would use javascript if I needed dynamic interaction between a webpage and a user.
    I would use C# if I were programming a boring business application.
    I would use C++, C, and possibly assembly if I were programming a game.
    I would use C if I were programming a library and wanted bindings for many languages.
    I would use C and assembly if I were programming a device driver.
    I would use C, assembly, haskell, or clean (or a combination) if I were programming a personal project.
    I would use some other language if the pointy haired manager told me to.

  5. #20
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    We have semi standardized coding at work... we all code to our own style but we are pretty alike. No required scheme just make it easily readable and comment now and then (since who really comments on every line of code or every function... well all know what a toString() function is going to do.)

  6. #21
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    >> We have semi standardized coding at work... we all code to our own style ... No required scheme ...

    Well, I can see how the standardisation has helped ye!!
    Last edited by twomers; 07-27-2006 at 03:27 PM.

  7. #22
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Quote Originally Posted by valis
    I would use C, assembly, haskell, or clean (or a combination) if I were programming a personal project.
    Out of curiousity:
    1) What is clean?
    2) Do you use both haskell and C in the same project? If so, how do you make them interact? I'm personally interested in functional languages, but have never managed to make something useful with them.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  8. #23
    Dump Truck Internet valis's Avatar
    Join Date
    Jul 2005
    Posts
    357
    Clean is another functional language very similar to haskell, it has a few slight syntactic differences which I like and generally performs better than haskell does. I haven't actually used it that much so I don't know how to interface it with other languages. It has been more of a fun toy for me to dump time into.
    To interface haskell and C you can use greencard and c2hs. I've found functional languages to be quite productive. I would encourage you to get a book when you have the time, it's definitely different and quite interesting.

  9. #24
    Registered User
    Join Date
    Aug 2002
    Location
    Hermosa Beach, CA
    Posts
    446
    Very unlikely. I have yet to encounter a company...
    I guess I'm just unlucky then.
    The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.

  10. #25
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    The field has tightened up to the point where you can't be a retard and earn a fat paycheck as a code monkey anymore. So a lot of those people have moved on, fortunately.
    So that's why I'm having problems. I'm not a retard.

    I'll try harder in the future...promise.

    Use the language that gets the job done. C and C++ can do anything but we didn't say how hard it is to do certain things. Even assembly can do anything but you will rarely, if ever, see anyone coding in it. Use the right tool for the job. After all using a phillips screwdriver to remove a wheel from a car isn't going to do much for you is it? The screwdriver is not the problem, it's how and what you are using it for.

    Ok, yeah, so MacGyver could do it but I couldn't.

  11. #26
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Quote Originally Posted by valis
    I would encourage you to get a book when you have the time, it's definitely different and quite interesting.
    I know how different and interesting they are. I have a year's worth of academic experience. Do you have a book recommendation that focuses on using Haskell (or another purely functional language, but I prefer Haskell) in the real world? I have "Practical Common Lisp", which is very nice, but I'm not fond of Lisp.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  12. #27
    Dump Truck Internet valis's Avatar
    Join Date
    Jul 2005
    Posts
    357
    Well with a year of academic experience under your belt you're probably beyond me. The one book I've read did address problem solving by thinking functionally, I don't know how real world you would consider it, more of a "put you on the track" because it was written to teach the language. It did have a lot of good problems to solve though. It focused on graphics, music, and other media; it's the only book I have read and it's called The Haskell School of Expressions.

  13. #28
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Thanks, I'll look into it.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  14. #29
    The Richness... Richie T's Avatar
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    469
    >>You missed an important tool...algorithms

    Yes algorithms are important enough, but i think that you can safely say that
    this line of Salem's post would cover algorithms:

    >>- the exact nature of the problem to be solved

    Example - Earlier this year I had a class in Digital communications, studying the
    basics of error correcting codes, data compression etc. There was a class
    project which involved implementing a specific type of encoding scheme in
    hardware, and writing a program to decode it. That involved using a specific
    algorithm that we were studying.
    No No's:
    fflush (stdin); gets (); void main ();


    Goodies:
    Example of fgets (); The FAQ, C/C++ Reference


    My Gear:
    OS - Windows XP
    IDE - MS Visual C++ 2008 Express Edition


    ASCII stupid question, get a stupid ANSI

  15. #30
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,401
    Quote Originally Posted by CornedBee
    I have "Practical Common Lisp", which is very nice, but I'm not fond of Lisp.
    HERETIC!!! Personally, Lisp is my choice of language for just about anything. It's amazingly flexible and probably TOO powerful. CLOS provides all sorts of interesting possibilities for people used to thinking in OO terms, and FFI lets you use all those nifty dlls you've or someone else has written in other languages. Most implementations allow you to compile down to a portable bytecode or a native image. Besides, what other language lets you write a compiler for that language in about four lines of code?
    If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What language did they make Java in?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 07-03-2005, 04:18 PM
  2. Strange loop
    By D@rk_force in forum C++ Programming
    Replies: 22
    Last Post: 12-18-2004, 02:40 PM
  3. assembly language...the best tool for game programming?
    By silk.odyssey in forum Game Programming
    Replies: 50
    Last Post: 06-22-2004, 01:11 PM
  4. Language of choice after C++
    By gandalf_bar in forum A Brief History of Cprogramming.com
    Replies: 47
    Last Post: 06-15-2004, 01:20 AM
  5. Language Script..
    By vasanth in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 03-30-2003, 06:48 AM