Which programming language do you prefer and why?

Discussion in 'Mac Programming' started by moonman239, Jan 12, 2015.

  1. moonman239 macrumors 68000

    Mar 27, 2009
    If you were allowed to use any of the currently-existing programming languages, and you could easily obtain whatever modules/packages/gems you need/want to use for any language, which language would you use and why?

    I use Objective-C, but have also used Python and Ruby. These two languages look promising, given that scripts are easier to read and write. Plus, both languages allow you to use compiled C libraries. However, unless you can find a wrapper for whatever library you want to use, you'll have to know C. But with Python, you have a few ways to incorporate a C library, one of which is Cython.
  2. ArtOfWarfare macrumors G3


    Nov 26, 2007
    Python. Because every other language pisses me off with the hoops it makes me jump through.

    I'm working on my own language which, unless someone else beats me to it, will probably be the end to other languages as we know them. But progress is slow on it for now since no one is paying me to make it so I'm just doing it on the side in my spare time.
  3. firewood macrumors 604

    Jul 29, 2003
    Silicon Valley
    The high-level language that I most recently used to successfully complete a large coding project of a similar nature. Whatever that was.

    That's always easier than using a programming language that I've never used before, or using one that's been forgotten due to lack of recent use.
  4. 960design macrumors 68030

    Apr 17, 2012
    Destin, FL
    I use Java for most of my projects. Why? Too many reasons to name, but most importantly: language design enforces better coding standards and multi-platform.

    I've also commercially used C, C++, Assembly ( many years ago ), Objective-C, PHP, Javascript and more, older languages that are very 1980's.

    I'm currently developing a commercial iOS app using Swift.

    My favorites? I like Java and Swift the best. I'm looking forward to using ArtOfWarfare's language in the near future.
  5. phrehdd macrumors 68040


    Oct 25, 2008
    I admit that the question is rather strange. Not all languages are created equal and as far as I am concerned, one should use the language that best suits the project at hand.

    Sadly, we are all forced into top down these days as well as "visual" this and that. Not all projects lend themselves to top down and certainly a lot of "visual" languages depend on C libraries which should tell you something.

    Python and others - event driven or scripting languages can be excellent choices when the right project presents itself. Of this type of language, my best projects used REXX but it was because the language made sense for those projects.
  6. moonman239 thread starter macrumors 68000

    Mar 27, 2009
    Certainly, there can be less code involved in Python than in Objective-C. In Python, I can create a property and assign it a value, all in 1 line of code. In Obj-C, I have to declare the property, synthesize it or override the getter method, then set it.

    The other thing with Python is you don't have to declare variables. I can run
    print anobject.x
    and Python won't care what anobject is, as long as it has a property named "x." In that way, Python makes up for its lack of protocols - I can create a delegate property that is told to run a function, and Python only cares that that function is defined.
  7. Sciuriware macrumors 6502


    Jan 4, 2014
    Retired after 40 years of programming I must have used them all,
    from assembler, Cobol, Fortran, Algol, Pascal, Visual C++ ... till Aleph.
    I finally settled down with JAVA (+Eclipse).
    It's a personal matter, but it lets me do what I want on any platform.
  8. dmi macrumors regular

    Dec 21, 2010
    To me, Perl is the language most conducive to expressing ideas,
    and tends to be the language of choice for personal projects.
    A good portion of my deliverable products are in C++, which facilitates interfacing with collaborators' C++ programs.
    But while C++ can be much more expressive than C, some of its deep arcana can make the
    language seem more like part of the problem to be solved than part of the solution.
    For shell scripts, I favor bash.
    For assembly language, Macro-10 and MX-6502 are fondly remembered.
    The F8 and 8086 seemed deranged in comparison.
    TECO was also quite nice for quick editing scripts, and a few more involved programs.
    Emacs was even more useful for writing programs to convert some MX assembler sources from BLISS to C,
    But I now use it primarily as an editor and almost never write programs in it.
  9. G-Mo macrumors 6502


    Nov 6, 2010
    Auckland, NZ
  10. cyb3rdud3 macrumors 65816

    Jun 22, 2014
    I prefer the one that lets me do the job that is required best. Not particularly limited to one. It all depends on the project.
  11. DaveP macrumors 6502


    Mar 18, 2005
    This. The answer for someone who does web scripting will be different then someone doing embedded work.

    I tend to do cross-platform projects that span a pretty broad spectrum and so I would say Objective-C as it is easier to drop into C or interact with C libraries than most other reasonably high level abstraction languages.


    I'm not sure if you are being serious...
  12. foobarbazqux, Jan 13, 2015
    Last edited: Jan 13, 2015

    foobarbazqux macrumors regular

    Apr 17, 2014
    The older I get, the less I care about one language vs another. They're all just tools to get the job done and I try to pick the best one for the task at hand. Plus, often times, I don't really have much of a choice.

    That depends on the application. I tend to lean towards Ruby for simple scripts/apps. If I care about performance, I tend to use either a combination of Ruby + C or just C++. If it's low-level code, it's usually C (don't usually have a choice for this case). If it's a desktop app that needs to be cross-platform compatible, I tend to use C++ and Qt since that combination tends to work well for the types of desktop apps I work on. If it's a web app, I usually use Ruby/Rails/JavaScript/etc.
  13. JustMartin macrumors 6502a

    Feb 28, 2012
    As others have said, it's really 'horses for courses' - I've recently been doing some script style stuff and found Python to be better/easier than any of the Unix shell scripts. It was easy to learn and the interpreted environment meant that I could test different approaches quickly. But, I wouldn't have thought of it as something that I would use for web or desktop applications.

    If I wanted to go for something that was a cross platform application then I guess Java would be the tool of choice. It's got a steeper learning curve than something like Ruby or Python, especially as the objects get more 'abstract', but there's a lot of support out there and it's pretty solid.

    But, I've seen a lot of languages come and go and it's difficult once I've stopped using one and thinking in it, to remember its good and bad points. But, I've just remembered SNOBOL. Oh, used to love that for text work. A little bit more readable than regular expressions and more powerful as well.
  14. Sciuriware macrumors 6502


    Jan 4, 2014
    1) the original question was: which language do you prefer/use, not which
    language would you recommend or even compel;
    good that some people are not my project leader.
    2) some of you may already have found out that for peculiar projects it is
    better to write a language of your own for a specialised job.
    Then the question might be: what language would you use to write a language in.

    Although I "was in Java" since the turn of the century, I preferred C for a
    threaded code compiler, while a callable virtual vi-editor was easily written in Java.
    So, ...... what do you think?

  15. roadbloc macrumors G3


    Aug 24, 2009
    QBasic. It's the only programming language I properly know. But I know it very well, pretty much off the back of my hand.
  16. 69bottles macrumors newbie

    Jan 14, 2015
    For all the Python lovers I would like to recommend you the Nim programming language. The syntax is very similar but the performance is excellent as it compiles down to C. I use it daily and it actually feels like a better swift, if you acknowledge that macros for meta programming are good. Of course, if you dislike macros then Nim will be horrible to you.

    As practical examples of what it can do you can take a look at https://github.com/gradha/quicklook-rest-with-nim which is a Quick Look plugin to render rst files. Or you can take a look at https://github.com/gradha/seohtracker-mac or https://github.com/gradha/seohtracker-ios which are simple open source apps to track your own weight, already in their respective app stores. Both apps share a common logic library (https://github.com/gradha/seohtracker-logic) for reuse, shortening development time.

    One of the good things about learning swift or nim is that they are both very similar in features and *feel*. Swift is right now much better integrated with Cocoa but Nim has the advantage of being cross platform, so you can write software for Windows or Linux.

    Depending on your taste that could be good or bad. If you want to stay purely OSX/iOS I seriously recommend swift.
  17. firewood macrumors 604

    Jul 29, 2003
    Silicon Valley
    For university coursework in programming language design and implementation, this was usually done using C (plus lex/yak/bison/et.al.) or Lisp. Most other programming language implementations are either written in themselves (self hosting), C, or assembly language. With C more common these days.
  18. Sciuriware macrumors 6502


    Jan 4, 2014
    Very interesting that course in history, but that was not the question.

    I'm just curious who is writing a (kind of) compiler today and in what language.
    I already told what I did.
  19. Senor Cuete macrumors 6502

    Nov 9, 2011
    Art of Warfare and it's going to take over the whole world.
  20. ArtOfWarfare macrumors G3


    Nov 26, 2007
    I am writing a new language. It's a pretty huge departure from anything anyone has ever seen before. It would take a while to explain all the ways it's different and why it's all going to combine to be the dominant language for at least a few decades (and I wouldn't want to just present individual changes from other languages to you.)

    It's not compiled right now. It has an interpreter written in C. Two reasons:
    1 - I've written interpreters before, but never compilers.
    2 - The speed increase would just be linear - similar speed gains could be gotten by just increasing the CPU.
    Of course, I intend to open this up for contribution via the open source community, so maybe someone else will know how/decide to write a compiler for it.

    My biggest inspiration is how lousy Swift and Kotlin are. Python and Ruby are each 20 years old now - why are languages being created this decade hardly any better than them? I had been just sitting on my ideas with the assumption someone else would do it first, until I realized that they won't.
  21. iSee macrumors 68040


    Oct 25, 2004
    I'll review it for you if you want.

    I've been around too long to be anything but highly skeptical, but I love this stuff and keep an open mind. Perhaps you are the rare crackpot who's actually on to something.
  22. ArtOfWarfare, Jan 15, 2015
    Last edited: Jan 16, 2015

    ArtOfWarfare macrumors G3


    Nov 26, 2007
    Maybe I'll be more a crackpot like the person who made Temple OS and Holy C.


    Probably not though. I don't have divine inspiration. And I don't describe the language and being somewhere between C and C++.
  23. iSee macrumors 68040


    Oct 25, 2004
    I'm not sure I should admit it, but having "grown up" on a Commodore 64, I actually understand exactly what that guy is talking about.

    There's a feeling I think most programmers can relate to where you get into a super-productive groove. The language, libraries, and tools of your environment fade into the background and you feel like you are directly manipulating your software at a conceptual level. It usually takes a certain level of experience with an environment to be able to reach that state for anything significant. But I think there are environments that make this easier. E.g., scripting languages can remove the complications of compiling and linking. Dynamic runtime environment can be directly manipulated without building extra levels of abstractions by hand.

    The C64 took the dynamic environment and transparency to a level you would hardly consider today (well, that guy does). Everything is memory-mapped and memory can be mapped directly to the screen where it can be examined and directly changed. Your program, runtime execution environment, data, graphics, sound, and other resources all live together in the same memory space. Sure, it's easy to screw everything up. But it's also very easy to reset and start again.

    But that guy is a terrible communicator. Heh, he would frequently start a sentence, stop half way through and never finish it (I think he was completing his sentences in his head). That whole thing is interesting to me, but in the end I think he's pursuing an aesthetic goal that is very personal to him... that is, it's a creative piece of nostalgia that is a nice mashup of things he likes from various points in his life.

    I should mention, I don't think of "crackpot" as a necessarily pejorative term. Mostly, all of us spend all our time trying to learn, understand and follow systems of knowledge and belief that large groups of other people are also trying to learn, understand, and follow. We're trying to follow the conventions of our society. I don't think there's anything wrong with that. In fact, it can often highly essential that we do this -- e.g.. you don't want anyone using novel traffic rules while you're trying to commute to work -- but if that's all *anyone* did, *ever* then there'd be little chance for anything to get any better.

    Crackpot are the ones, at the substantial risks of failure and social cost of zagging when everyone else is zigging, that will try something different anyway.

    Sure, they usually fail. But sometimes they succeed, and the next thing you know we are all zagging, and things are better than they used to be.
  24. talmy macrumors 601


    Oct 26, 2009
    I started with Fortran and IBM 360 Assembler in 1968. I've used lots of languages. Written much more C than anything else, but to answer the question -- Java, for portability, nice widgets, and well thought out libraries. I also like Lisp for some mathematical problems where its support of "bigints", rational, and complex number arithmetic is useful.
  25. hhas macrumors regular

    Oct 15, 2007
    There is only one god and his name is iPad.

Share This Page