Your favorite programming language

Discussion in 'Mac Programming' started by Bill McEnaney, May 25, 2010.

  1. Bill McEnaney macrumors 6502

    Joined:
    Apr 29, 2010
    #1
    What's your favorite programming language and why? I plan to do use Haskell, OCaml, Prolog, and Lisp from now on, but I'm open to better ideas. Thanks.

    Bill
     
  2. Catfish_Man macrumors 68030

    Catfish_Man

    Joined:
    Sep 13, 2001
    Location:
    Portland, OR
    #2
    I'm a big fan of io (www.iolanguage.com) for its simplicity, flexibility, approach to concurrent programming, and ease of integration with other things. I do miss static typing though.

    Controversially, the language I've enjoyed the most while actually using it for production code (rather than playing around) is ActionScript 3. The tools suck, and the libraries range from mediocre to pretty good, but the language is great.
     
  3. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #3
    C is; but that is simply because it is the language I feel most comfortable with. The more I use Python though the more I enjoy its ease of use and multi paradigm approach to programming.

    I'm aching to get to grips with Haskell or Erlang though and have set a little time aside in the next couple of weeks to slog it out (be prepared for a stream of noob questions :)).
     
  4. mww macrumors newbie

    Joined:
    May 26, 2010
    #4
    OCaml

    OCaml is simply the best language I know: It is a functional language, so there is no distinction between expressions and statements, like in C-like languages. It has strong typing and type inference, so you catch a lot of errors at compile time. Unlike Haskell it is not a pure functional language but has mutable values for those global variables you need in real life projects. It has pattern matching, garbage collection and its blazing fast (not much slower than C).
    It even has several industrial users, so its not an academic project used only to torture students at universities... ;)

    Only drawback is the lack of a cool cross-platform GUI library... :(
     
  5. Rhalliwell1 macrumors 6502a

    Joined:
    May 22, 2008
    #5
    For me it's C, but i am still learning. I feel comfortable and confident with it. I also like the fact it operates at quite a low level. :)

    I am just getting Objective-C under my belt and then i am moving on to ada (i'm starting a job in July that is ada based, anyone got experience with it?)
     
  6. pilotError macrumors 68020

    pilotError

    Joined:
    Apr 12, 2006
    Location:
    Long Island
    #6
    I grew up on C and Pascal, C being my favorite.

    I like Java for its rich functionality.

    Perl is interesting, but ultimately, nothing has happened with the language lately.

    I hated Lisp, mainly because I had no useful problems to apply it to.

    Next up is Python, although, I don't understand these shops using it as their primary language. Same with Perl.

    I've never even heard of Ocaml. Does that mean I'm getting Old? ;) :p
     
  7. Niceisnice macrumors newbie

    Joined:
    May 26, 2010
    #7
    From OCaml to OPA

    OCaml is great, I agree.

    But in the area, the one I love is OPA @ mlstate.com
    It is available for Mac and very good for building web apps. It is not quite perfect right now but there are releases pretty often and it is improving.
     
  8. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #8
    I wouldn't say I have a favorite programming language. I don't have a favorite physical tool, either. I guess a hammer is probably at the top of my list for favorite tools for driving nails manually. Probably a screwdriver would be at the top of my list for driving screws manually. I feel about the same way about programming languages. If i need to copy some files, i'm probably not starting with Haskell. If i need to write a web app i'm probably not reaching for Fortran 77. Some languages are better suited to particular problem sets than others, so my favorite language is the one that has the best support (existing code would be nice, too) to solve the problem in front of me right now.

    -Lee
     
  9. qtx43 macrumors 6502a

    Joined:
    Aug 4, 2007
    #9
    pseudo-code, because it always works how I intend it to work.
     
  10. CarlJ macrumors 68020

    CarlJ

    Joined:
    Feb 23, 2004
    Location:
    San Diego, CA, USA
    #10
    C is an old friend, the universal assembler. Being in total control of all the bits is both a blessing and a curse.

    Perl is my constant companion, it has a lot to like, and its faults are usually easy to overlook. My fingers can practically write it for me. My go-to (ha!) language for most things.

    Scala is lovely, object-oriented and functional, compiles to run on the JVM, and was largely written by the guy/team who did one of Sun's Java compilers. There's an absolute minimum of boilerplate coding here; one's code looks like a dynamic language (say, Ruby), but it's statically typed, with a whole lot of type inference going on. Lots of thought went into making the language clean and orthogonal, all value are objects, all operators are methods. And they did a decent job of stealing Erlang's Actor model to make concurrency work nicely. And Artima's "Progamming in Scala" is one of the best computer books I've read in a long time (it shared a Jolt Award with Real World Haskell). I'd like to write a bunch more Scala code in the future. That said, I'd dearly love to see it ported to generate LLVM code instead of JVM code, and then drop the inevitable compromises that were made to work under the JVM. Then we'd be BFF :)

    Haskell is my exciting new friend, really really functional, it makes it so easy to write correct programs. And it compiles to fast native code. I probably should like OCaml for the same reasons, but something about Haskell's syntax pleases me more. Plus it's lazy, in a very good way. I love that they were able to write a working Perl6 implementation in Haskell in just a few months, while the native/Parrot implementation struggled. And what other language can boast a tutorial like, "Learn You a Haskell For Great Good"?

    I'd like to see myself writing new projects in Scala if they're large, or Perl if they're small (because any time I try to get up steam for Python or Ruby, I realize that Scala is a better language than either, and runs rings around them to boot, so Perl it is, for low end tasks).
     
  11. autorelease macrumors regular

    Joined:
    Oct 13, 2008
    Location:
    Achewood, CA
    #11
    I've always been fascinated with small languages that manage to incorporate lots of functionality. I don't use it that often, but Lua is a great example.

    Its feature set is sparse; it provides only one data structure, the table. Tables are basically associated arrays. There are no facilities for object-oriented programming. But, since functions in Lua are first-class, you can create a table of functions and turn it into a class! An object is just a table of instance variables with a pointer to its class table.

    Not only that, but the Lua runtime is a few kilobytes in size after compilation. It's small enough to be statically linked into an application.

    Unfortunately, it has some drawbacks. Interaction between C and Lua is clumsy and requires parameters to be passed and returned on a stack. The programmer often has to make stack diagrams to avoid over/underflows. However, from a design perspective, it's quite fascinating how small, fast, and powerful it can be.

    Forth is another cool language, but I don't think I'd use it for anything. It's basically the thinnest possible layer on top of assembly language; compiled Forth code is basically just a string of subroutine calls.

    Assembly is cool too. I've always hated x86 assembly, but smaller 8-bit architectures can be quite fun and challenging to program. It's great to be able to read a listing and figure out exactly how many microseconds a piece of code will take to execute. If only I'd been born ten years earlier...
     
  12. mslide macrumors 6502a

    Joined:
    Sep 17, 2007
    #12
    I'll use whatever is the best 'tool' for the job. For me, that tends to be C++ most of the time as it is powerful enough to do a lot of things and is widely used.

    When I'm writing desktop applications, I almost always use C++ plus the Qt framework to keep things cross-platform compatible.
     
  13. xStep macrumors 68000

    Joined:
    Jan 28, 2003
    Location:
    Less lost in L.A.
    #13
    Can' say I have a favorite. That may be due to limited exposure to alternatives. In college I enjoyed PL/1 and IBM mainframe assembler the most. There wasn't a demand for that in the corporate world. Perl did come in handy at times though.

    I've enjoyed Objective-C since the NextStep days but haven't done anything of production release quality in it. The related Cocoa community is great and I'm enjoying hanging out at the local NSCoder Night and CocoaHeads meetings.

    The environment I have the most experience with is a 4GL called Powerhouse by Cognos. A 4GL allows for quick and consistent results thanks to the built in logic it has. This is logic you don't have to repeatedly write. I have a fondness for this tool because it allows you to ignore many low level implementation details and focus on the unique issues you need to resolve.
     
  14. Bill McEnaney thread starter macrumors 6502

    Joined:
    Apr 29, 2010
    #14
    Maybe with your help, Cromulent, I'll learn to like C. I know that its designer(s) assume that programmers know how to use their languages properly. But I've always thought C was too permissive, too able to promote programmers' mistakes, and too prone to tempt me to micro-optimize in ways that compromised program readability. I hope I'm mistaken because C is wonderful for systems programming, especially when an expert writes in it.
    Haskell is my favorite programming language because it's a concise, elegant one that can make program correctness easy to prove. But it's too new to me for me help a noob learn it. Erlang interests me, too, because it seems excellent for writing parsers for programming languages.
     
  15. Catfish_Man macrumors 68030

    Catfish_Man

    Joined:
    Sep 13, 2001
    Location:
    Portland, OR
    #15
    "cool" and "cross-platform" are both anti-goals of a good GUI library.
     
  16. Bill McEnaney thread starter macrumors 6502

    Joined:
    Apr 29, 2010
    #16
    You've just explained largely why I prefer OCaml to C. If I need to choose between OCaml and a purely functional language, a purely functional language, I'll always choose the purely functional language. But OCaml's speed first attracted me to it when I shopped for a functional language to program in. Read the comparisons there if you can find the Great Computer Language Shootout's website. It'll show you that for speed, OCaml definitely rivals C.
    I love Python's list comprehensions. Python is the only language I know of that will let me write something like this:

    [sum n * n for n in range(1, last +1)]
     
  17. mrbash macrumors 6502

    Joined:
    Aug 10, 2008
    #17
    I like Latin because using it makes me sound smart. Also my favorite colour is Prussian Blue.

    I also like to start esoteric threads.
     
  18. Loge macrumors 68020

    Loge

    Joined:
    Jun 24, 2004
    Location:
    England
    #18
    APL, for the following

    - interactive environment
    - concise
    - array manipulation without looping
    - unique notation
    - rapid development
    - nostalgia
     
  19. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #19
    Favorite?

    Basic or Assembly language.

    But to get real work done:

    C, Objective C, Javascript, Python, & etc.

    I used to like playing with Forth, Lisp and Scheme, but haven't touched them in well over a decade.
     
  20. ThaGrapist macrumors newbie

    Joined:
    Feb 13, 2010
    Location:
    NC
    #20
    I'm a believer in using the right tool for the job, but my favorite language is Lua. I don't use it for everything, but I think I have the most fun when I do get to use it :cool:
     
  21. pilotError macrumors 68020

    pilotError

    Joined:
    Apr 12, 2006
    Location:
    Long Island
    #21
    I have to laugh, PL1 and APL were both actively used in the last shop I consulted in. Never underestimate the longevity of something useful!
     
  22. Bill McEnaney thread starter macrumors 6502

    Joined:
    Apr 29, 2010
    #22
    Fortran and Lisp are the two oldest high-level programming languages I know. I'm glad they're still around, but I'm hoping Cobol will die out if it hasn't done that yet.

    Cobol includes, or included, the alter statement, a little gem that any sadist would adore. In Cobol's early years, programmers needed to do a lot to save main memory. So the language's designer invented "alter."

    Say you write two Cobol paragraphs: Print-Paycheck and Calculate-Deductions. Later in the program, you say, "Alter Print-Paycheck to proceed to Calculate-Deductions." After the computer executes that statement, each seeming call to Print-Paycheck will be a call to Calculate-Deductions instead. Fill a program with alter statements, include that program in another program, and you'll drive the other program's maintainer insane. I couldn't be that cruel. Neither could any of you, I'm sure.
     
  23. Sigmund macrumors newbie

    Joined:
    Sep 27, 2009
    Location:
    Bergen, Norway
    #23
    My favorite language - not in the sense of being the best tool for most jobs, but for beauty and pleasure - was the assembly language for the MC680x0 processors. The instruction set was extremely well defined and after quite a bit of tweaking (the fun part) the code was small, fast and highly logical, the equivalent of poetry for a machine. The Mac Toolbox interfaced well to the language. For the big bulk of code where productivity was more important than optimization, I learned to enjoy Ira Ruben's macros that turned the assembly into a high level language.
     
  24. pilotError macrumors 68020

    pilotError

    Joined:
    Apr 12, 2006
    Location:
    Long Island
    #24
    Hate to dissapoint you, but Cobol is alive and well in NYC. You can actually make a great living out of it!
     
  25. edenwaith macrumors 6502a

    edenwaith

    Joined:
    Aug 7, 2001
    #25
    Ada?

    Where did you get a job doing Ada?! My guess is something dealing with the government or military. Ada was the first "real" programming language I learned, but in the past ten years, I think I've only seen one or two jobs that requested Ada experience.

    Since I only had BASIC programming experience before I got to Ada, I didn't mind the language too much. Some people who already had programming experience griped about the language, since it can get somewhat verbose at times. One of the supposed advantages of the language is due to its security and exception handling.
     

Share This Page