Thread: Which language?

  1. #46
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by MK27 View Post
    They are simply much more pronounced in python, so people who like to program in C++ often enough end up liking python even better.
    Except me
    I don't like python.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  2. #47
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Quote Originally Posted by MK27 View Post
    Only in your mind are those languages "more suited" to complex tasks than interpreted ones. As a rule they are built on a C/C++ foundation and are capable of accomplishing more high level activity in a more compressed fashion == greater complexity.
    If the Google Search Engine back-end were in Python, I would imagine it would be down more than these forums. It probably wouldn't even run. Sorry to break it to you. Three words: GIL. Honestly, Python just isn't fast enough for the massive amount of data Google processes (it's quite astounding), generates algorithmically, etc. It's much better at scripting the actions of an already existing solution, working with the data, etc.

    I'm not saying run to the lower level at the first sign of any complexity, it's really a rare case, especially in web dev.
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  3. #48
    Registered User
    Join Date
    Feb 2010
    Posts
    11
    Quote Originally Posted by Dae View Post

    I must say it doesn't help having fanatic quotes in our signatures or avatars (ahem Elysia, you ooze C++ fanboi). Then we got people here who exclusively use C, or C++, but never both. Personally, not only do I see both their merit, but would consider both as options for projects until omitted. Many people here will just jump straight to one language. Fanaticism, fanboyism, whatever you want to call it.

    All I meant was don't be a masochist, like that guy in in the job section developing Wagrold. Don't go and start reading NeHe thinking you're going to code some custom graphics engine. There's really no purpose unless you plan on making that a career choice (3d engine developer). Even then I'd probably start at a higher level. There's really nothing wrong with C for this project other than libraries. Your project will never be scaled higher than many successful C games, such as open sourced Quake 3. Nowadays you're going to want the options C++ provide for games. There's a good chance you'll just end up writing C with classes style code anyway (meaning you don't fully understand how to utilize C++, which takes time, and the further you go along the more you favor metaprogramming over OO). You could always just ignore templates or classes, or both, if the style fits you better. In many cases I don't see any reason to go fully down to C for games, applications, etc.

    If I were just starting, I would be looking into the recently released Unreal Development Kit, or the good ol Source Engine. Start at a high level. Actually achieve something. Start a team or join a team (there's plenty ranging from mods, to professional). If you disagree, well, revert back to previous suggestions.
    Fair one, I've been doing some level design on the L4D SDK and it was fun, I'm probably going to be doing some of that stuff too, along with maybe some 3D modelling etc, I just don't know which bit of developing I want to do yet

    Quote Originally Posted by Mario F. View Post
    Like how exactly? You mean people debating heatedly about something, instead of being paragons of suave manners and consequently boring and uninteresting?

    Yeah. Many threads are like that. No one here is angrily arguing at anyone. It's ok.
    Fair one, I wasn't really expecting the war I guess I thought it was a little more structured in what language you use for what, it seems that you can use lots of different languages for one purpose. I think I'm after a language to learn to get me into programming, hopefully one I'll use so it can be my main one. I can see myself learning C among others (I know some of the equipment at work uses Oracle/SQL) aswell but I think I'm gonna use C++ as my entry point.

    Then I can come back and give you lot some stick

    P.S. Sorry if i miss something directed at me some of what I'm reading is a bit alien to me and I might get lost in it!

  4. #49
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Nothing has been directed at you yet, that you have missed... don't worry.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #50
    Registered User
    Join Date
    Feb 2010
    Posts
    11
    Thanks Elysia, I'm a bit dazed and confused atm, lol.

  6. #51
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by MK27 View Post
    Consider web technology: since server side interpreted programs remain on the server and are not exposed to the public, the source can remain secure. And lo and behold, the biggest realm for interpreted language programming is server side programming!
    There's indeed a problem with distributing your work if it's based on web technologies. Python wasn't a good example for the reasons Laserlight mentioned. But you can argue for PHP for instance, and I would agree.

    However, companies wishing to distribute projects developed in, say PHP, can protect themselves by adopting different methods of distribution and making use of properly written EULAs. Ultimately, they may not even distribute the software, but instead just the service. On the other hand, these type of languages do not respond well to just any type of development. Their problem domain is very limited and not that well compatible with the notion of software distribution in the first place.

    [quote]The REAL reason you need to use a compiled language with commercial software is so you can distribute product with no source code.[quote]

    No. The real reason is probably an historical one. Compiled languages simply had a stronger impact in software development history. C and C++ specifically, took the development community by storm and contributed enormously to increase the focus on compiled solutions as a "standard" for performance and control over the end result.

    Interpreted languages (which can also be distributed without source) are still struggling to get accepted as de facto solutions to real-life computing by even the open source community on most cases. There's no reason whatsoever for, say Firefox, to not have been developed in Java. But the end result would probably not have made it one of the most successful OS projects to date.

    But, while the realm for compiled language programming will (by necessity) always exist, it is shrinking, just like the realm for assembly did. As DAE points out, Google loves python and it is rapidly replacing C++ in a lot of other areas too, me thinks -- like a lot of new projects that once upon a time would have been C++ are now python, but of course they are generally open source (and probably pre-empt or replace closed source alternatives). This is precisely because of the "development advantages" Elysia has been plugging. They are simply much more pronounced in python, so people who like to program in C++ often enough end up liking python even better. Or else they skip C++ (skip C!) and go straight into that new niche.
    There is nothing in the compiled nature of C++ that is making it less useful. What is displacing C++ in certain areas is not the fact it is compiled. Instead it's the emergence of high-level languages (interpreted or not) that can produce similar results in a lot less development time in key problem domain areas. And this is not Python for sure. Python's problem domain is rather small in comparison. Instead generic programming languages like Java, Delphi, VB, or C#. Some more successfully than others.

    What really moves languages about the ladder of "popularity" is their ability to deliver more in less time and with less effort. Many of the languages that can compete with C++ are themselves compiled and this has no effect on their ability to displace C++.

    A programming language like C#, being marketed the way it is and by who they are, has the potential to all but completely wipe out C++ from traditional GUI-based software in the Microsoft platforms. It's just impossible to negate the advantages of C# (supported by the .Net Framework) over C++ on this area. It's overwhelming. And even more because if there is a need for a performance-critical backend, C# can interface with C++ on those areas where it will make a difference.

    This has nothing to do with the fact C# is interpreted or not. Programmers don't really give a rat's arse to that. They don't even care about the fact the resulting MSIL that gets distributed is a dead giveaway to their source code. There's enough tools to obfuscate and even compile to native code. It is simply the fact they can build a complex GUI application in a fraction of the time it would take them in C++ with any of the current frameworks and without the complexity involved in library dependency that is the hallmark of C++ development.
    Last edited by Mario F.; 02-07-2010 at 03:42 PM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  7. #52
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Dae View Post
    If the Google Search Engine back-end were in Python, I would imagine it would be down more than these forums. It probably wouldn't even run. Sorry to break it to you. Three words: GIL. Honestly, Python just isn't fast enough for the massive amount of data Google processes (it's quite astounding), generates algorithmically, etc.
    I have no doubt about that, I just brought up Google to point out to Mario that programming the web is not all kiddy stuff. Altho "generates algorithmically" kind of implies the data is somehow too complex to deal with any other way, as opposed to simply being of incredible volume. You keep trying to slyly imply that python (which I have no personal attachment to) is maybe too simplistic to do grown up work when the issue is not related to that at all. This is more of that mystique++ malarky. The same algorithms are possible either way, just what is a barely noticeable performance issue under normal circumstances might be somewhat more severe if you are talking about dynamically indexing the entire WWW.

    Like I have seen more than one person cboard who has absorbed some piece of nonsense about the limitations of using interpreted languages, and now they are real neophyte C++ programmers no one can tell them anything different (the "see no hear no speak no" monkey).

    How many people are currently working on a project that involves the amount of data Google processess? How many people have ever worked on a project of that scale?

    There will always be a need for compiled languages. There is the real and obvious need that somewhere along the line you need a compiled executable. But this does not account for their general predominance -- I think that is more because of tradition and the time it takes to develop programming expertise, and very significantly because of the closed source issue.

    I guess I thought it was a little more structured in what language you use for what, it seems that you can use lots of different languages for one purpose. I think I'm after a language to learn to get me into programming, hopefully one I'll use so it can be my main one. I can see myself learning C among others (I know some of the equipment at work uses Oracle/SQL) aswell but I think I'm gonna use C++ as my entry point.
    And just to be clear I'm not trying to mess with what is a wise decision, I just get tired of the C++ glee club pretending that this is part of the Divine order and thank God they've saved another poor soul from the clutches of the Devil and the deep blue ____. I like programming; for me it is about more than my allegiance to one language over another and people should not be taught this attitude.
    Last edited by MK27; 02-07-2010 at 04:00 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  8. #53
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by laserlight View Post
    Possible inconsistencies in the exact version of the Python interpreter aside, it is possible to distribute a Python program without distributing the source code, i.e., by distributing the compiled bytecode.
    I wasn't aware of that about python, in which case it may end up getting genuine "market share".

    Ever seen a javascript obfuscator?
    Free Javascript Obfuscator

    They get almost obscene. But all this only supports my point about how significant issue of restricting source distribution is and how significant a historical factor it has been. And how all this "in the best of all possible worlds" stuff is slightly fantastic idealization.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  9. #54
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Mario F. View Post
    There is nothing in the compiled nature of C++ that is making it less useful. What is displacing C++ in certain areas is not the fact it is compiled. Instead it's the emergence of high-level languages (interpreted or not) that can produce similar results in a lot less development time in key problem domain areas. And this is not Python for sure. Python's problem domain is rather small in comparison. Instead generic programming languages like Java, Delphi, VB, or C#. Some more successfully than others.
    Well, I think you are downplaying the advantages of interpreted languages, such as easy portability and such. I'd count Java and most/all of those others as interpreted in that sense. They use some kind of interpreter.

    Otherwise, I totally agree/was informed by your last post, Mario. The reason I used python as an example is because even in my short programming career I would say over the last 6-12 months I just keep noticing more and more python projects popping up (nb., of course what it is most likely to "replace" is perl, tho the perl interpreter I believe has a number of technical advantages, such as no GIL/concurrency issue). My impression of python is that it looks much more like C/C++, so C/C++ students have probably taken to it. Plus it's new-fangled and has a scarey cool name.
    Last edited by MK27; 02-07-2010 at 04:03 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  10. #55
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Actually, why are we classing interpreted languages as more portable than compiled ones? Both require that there exists software, one way or another, for the target platform. This Java portability nonsense is rubbish, I say. I have no good evidence of the contrary.
    I wouldn't say interpreted languages are more portable than compiled ones...
    Rubbish, I say. Rubbish! Let's turn this thread into a 3rd direction too, shouldn't we? It will be fun!
    Last edited by Elysia; 02-07-2010 at 04:05 PM.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  11. #56
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by Elysia View Post
    I wouldn't say interpreted languages are more portable than compiled ones...
    If the makers of an interpreted language want to make it portable, they concentrate the efforts on their runtime interpreter, leaving (for the most part) the programmers free of that task. Conversely, if the makers of a compiled language want to make it portable, they will have an hard time doing it in the run-time library and the end result is a generic language that puts on the programmer the weight of such task.

    This is what is meant generally when it is said "interpreted languages are more portable than compiled ones", and not that compiled languages cannot be equally or more portable than interpreted ones.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  12. #57
    Registered User
    Join Date
    Jan 2010
    Posts
    412
    Quote Originally Posted by MK27
    I'd count Java and most/all of those others as interpreted in that sense. They use some kind of interpreter.
    Don't you think you are generalizing a bit to much here? By that logic all programming languages are interpreted in the sense that the cpu interprets the opcodes it is given.
    I wouldn't call C# (or any other .net language) interpreted because it is compiled to native code at runtime.
    As for java; I don't know how sun's official java vm handles java bytecode, but I have read about other VMs using a JIT compiler.

    Quote Originally Posted by Mario F.
    If the makers of an interpreted language want to make it portable, they concentrate the efforts on their runtime interpreter, leaving (for the most part) the programmers free of that task. Conversely, if the makers of a compiled language want to make it portable, they will have an hard time doing it in the run-time library and the end result is a generic language that puts on the programmer the weight of such task.
    But this is more about implementations than the languages themselves.

  13. #58
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Mario F. View Post
    If the makers of an interpreted language want to make it portable, they concentrate the efforts on their runtime interpreter, leaving (for the most part) the programmers free of that task. Conversely, if the makers of a compiled language want to make it portable, they will have an hard time doing it in the run-time library and the end result is a generic language that puts on the programmer the weight of such task.
    All the code in the runtime essentially has to be the same as for any compiled language, so I see no difference here. Both the compiled and interpreted languages must define a function in their framework as a series of OS calls.

    Quote Originally Posted by _Mike View Post
    Don't you think you are generalizing a bit to much here? By that logic all programming languages are interpreted in the sense that the cpu interprets the opcodes it is given.
    I wouldn't call C# (or any other .net language) interpreted because it is compiled to native code at runtime.
    As for java; I don't know how sun's official java vm handles java bytecode, but I have read about other VMs using a JIT compiler.
    They are called interpreted because there is a middle-software, ie a program between the code and the OS, that reads the instructions in the instructions and converts them to machine-specific instructions.
    This is as opposed to native binaries where the instructions are machine instructions which are natively fed to the cpu. So I would definitely call C# and Java interpreted languages.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  14. #59
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by _Mike View Post
    But this is more about implementations than the languages themselves.
    I'm not sure what you mean. The implementation is not going to solve any portability issues. These do not steam from a language specification that works differently from one implementation to another. That would be a bad language design. Instead portability issues that arise from compiled languages translate into lack of immediate access to certain portable facilities. For instance, file access.

    The solution has to be given by the programmer or the library developer. So it can be said in general that portability issues are easier to deal with in interpreted languages that can develop a language specification that includes all the needed functionality and handle differences between each platform in the runtime layer.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  15. #60
    Registered User jeffcobb's Avatar
    Join Date
    Dec 2009
    Location
    Henderson, NV
    Posts
    875
    Quote Originally Posted by Mario F. View Post
    No. It's like saying "payroll software is one of the most complex business applications you can develop".

    But because you never done any payroll software and don't even know the requirements for such software, you estimate WRONGLY that you can produce an usually accepted argument about generalizations. Problem is, there's no generalization.

    I'll say it again just in case your head is still up your arse: Payroll software is one of the most complex business applications there is.
    Not wanting to dip my toes into this particular boiling pot but I would like to add large-scale insurance systems to payroll systems. Same level of complexity WRT laws, regulatory bodies and so forth and absolutely no place for C b/c C keeps you glued to the code-level whereas C++ or any language that really supports things like OOP from the ground up lets one consider the larger architectural problems and frankly simplifies maintenance. This opinion is based on my experience; yours may vary. I use C for embedded and C++ for larger scale apps. If all you learn or become proficient with is a single language your tool box will only have one tool and you will be forever trying to pound a screw into a board with a hammer....to awkwardly twist an old analogy...

    The other misconception I would like to do away with here is that this forum is only populated by C++ 101 programmers....some are and some are not.
    C/C++ Environment: GNU CC/Emacs
    Make system: CMake
    Debuggers: Valgrind/GDB

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 01-21-2010, 04:40 PM
  2. 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
  3. Strange loop
    By D@rk_force in forum C++ Programming
    Replies: 22
    Last Post: 12-18-2004, 02:40 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