Closed Thread
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

Thread: Another Question on What Language to use!

  1. #11
    Join Date
    Mar 2010
    Posts
    15
    Rep Power
    0

    Re: Another Question on What Language to use!

    Sorry it took so long for me to reply but this really helped me. JCoder thanks! I have to say that ur post was very simple but informative. Like i said i kinda new the answer to these questions but getting outside perspective always helps.
    I Feel comfortable in both languages though again I have never done gui stuff with C++. But i think i would rather drop the web development aspect for a self contained exe. I have always found that What ever u can do in Java u can do in C++ with more efficiency at the cost of some development time (atleast for me)! So i think im goin to leave my comfort zone slightly and go with C++. Im goin to have to learn GUI but i think it will be well worth it.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #12
    JCoder is offline Programming Professional
    Join Date
    Sep 2009
    Posts
    245
    Rep Power
    10

    Re: Another Question on What Language to use!

    Quote Originally Posted by WingedPanther View Post
    At least C++ is self-consistent.
    Try to override the && operator so that it is semantically equivalent to the builtin && operator. You can't. This is just one small example of inconsistency in the language design. Another one is that, although C++ aims to be an OOP language, it lacks encapsulation, both compile-time and run-time. Wow, there is even a large site all about C++ self-inconsistencies: http://yosefk.com/c++fqa/

    Also, some of the Boost libraries would be very challenging to implement in Java with the same level of elegance for the user.
    You mean boost::foreach implemented as a pure old C macro or boost::smart_ptr which are a poor-man's inefficient GC as "elegant for the user"? Or lambda-expressions that are not true-lambdas because they force you to use some "macro-template-dialect" inside the closed blocks?

    I like Java, but they need to admit the need for operator overloading (autoboxing, string and '+').
    All these things have been fixed in Scala. No need to go back to C++.

    Won't get far trying to write an operating system in Java.
    It is just another widely repeated myth - simply not true. You can get just as far or even further than as doing an OS in C. This is because JVM/CLR is an almost-complete operating system kernel - it manages memory, concurrency, dynamic module loading, linking and executing, it controls access privileges. They (MS, Sun) actually did some research operating systems in managed languages. These systems are much more advanced when it comes to security and dependability. Just take a look at the Singularity project by Microsoft.

  4. #13
    Join Date
    Oct 2007
    Location
    /dev/null
    Posts
    4,513
    Blog Entries
    8
    Rep Power
    59

    Re: Another Question on What Language to use!

    You try writing a bootloader in Java and see how far you get. And what's your VM going to run on top of? If it's native compiled it's going to have wonderful overhead.

    EDIT: BTW I thought I'd just point out a few things about Singularity, namely that the HAL is written in C++ and parts of the kernel are written in C.
    sudo rm -rf /

  5. #14
    JCoder is offline Programming Professional
    Join Date
    Sep 2009
    Posts
    245
    Rep Power
    10

    Re: Another Question on What Language to use!

    Try to write a bootloader in C++. Or any Linux kernel module. You also can't.

    If your car has some parts made of plastic, it doesn't mean it is a plastic car.
    Some low level parts can be only done in C or assembly. The rest 99% (together with device drivers) in a managed language.

    BTW: Natively compiled managed code does not need to have an enormous overhead. It is just harder to make a good compiler. Excelsior's JET compiler for Java can sometimes outperform GCC in produced code quality.

    Back to the topic: in webapps you don't need to access hardware directly. And also you usually have plenty of RAM. So C++ has no single advantage over managed languages in this case.

  6. #15
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: Another Question on What Language to use!

    Quote Originally Posted by JCoder View Post
    Try to override the && operator so that it is semantically equivalent to the builtin && operator. You can't. This is just one small example of inconsistency in the language design. Another one is that, although C++ aims to be an OOP language, it lacks encapsulation, both compile-time and run-time. Wow, there is even a large site all about C++ self-inconsistencies: C++ Frequently Questioned Answers
    I did, actually, for my fuzzy bool class (posted in the tutorials section). It wasn't hard at all.
    You mean boost::foreach implemented as a pure old C macro or boost::smart_ptr which are a poor-man's inefficient GC as "elegant for the user"? Or lambda-expressions that are not true-lambdas because they force you to use some "macro-template-dialect" inside the closed blocks?
    No, I was thinking of the utility classes for defining a class to be an Abelian group, or a field, etc. You only have to define a handful of the functions.

    All these things have been fixed in Scala. No need to go back to C++.

    It is just another widely repeated myth - simply not true. You can get just as far or even further than as doing an OS in C. This is because JVM/CLR is an almost-complete operating system kernel - it manages memory, concurrency, dynamic module loading, linking and executing, it controls access privileges. They (MS, Sun) actually did some research operating systems in managed languages. These systems are much more advanced when it comes to security and dependability. Just take a look at the Singularity project by Microsoft.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  7. #16
    gokuajmes's Avatar
    gokuajmes is offline Programming God
    Join Date
    Jan 2010
    Location
    India
    Posts
    516
    Blog Entries
    5
    Rep Power
    12

    Re: Another Question on What Language to use!

    my best bet , jump into Delphi you will Never regret .Because delphi was developed for GUI programming and is .NET compliant also can make native executables.
    As for as a Stand alone Java applications ,thats not possible

  8. #17
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: Another Question on What Language to use!

    There is a portable version of Java that makes zero-installs effectively possible. If you need cross-platform, Lazarus is a good alternative to Delphi.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  9. #18
    JCoder is offline Programming Professional
    Join Date
    Sep 2009
    Posts
    245
    Rep Power
    10

    Re: Another Question on What Language to use!

    @WingedPanther:

    Code:
    Fbool Fbool::operator&&(Fbool var)
    {
      double temp;
      if (this->probability < var.probability)
        return Fbool(this->probability);
      else
        return Fbool(var.probability);
    }
    Your code is not consistent with the default && short-circuit property.
    If the first (this) FBool had support 0, the second FBool should never be evaluated.


    Code:
    if (false && f(blablablah)) {  // f is not called - standard built-in && operator short-circuits
    }
    
    if (FBool(0) && g(blablah)) {  // g is called, although the result is always FBool(0), regardless of the g's result
    
    }
    In C++ you can't do it. In Scala, Ruby or Python you can.

    BTW: You use invalid terminology in your Fuzzy XXX tutorials. This should be called "support", not "probablity". Actually support has nothing to do with probablity.

  10. #19
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: Another Question on What Language to use!

    Why on earth would I call it support? Fuzzy bools are precisely about probabilities.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  11. #20
    Join Date
    Oct 2007
    Location
    /dev/null
    Posts
    4,513
    Blog Entries
    8
    Rep Power
    59

    Re: Another Question on What Language to use!

    Quote Originally Posted by JCoder View Post
    Try to write a bootloader in C++. Or any Linux kernel module. You also can't.
    "Or any Linux kernel module." As long as you know really know what you're doing, yes you can. You just need to know what to avoid. As far as a bootloader, you can write most of it in C or castrated C++, with a lot of effort.

    Quote Originally Posted by JCoder View Post
    BTW: Natively compiled managed code does not need to have an enormous overhead. It is just harder to make a good compiler. Excelsior's JET compiler for Java can sometimes outperform GCC in produced code quality.
    Really? Where'd you get these statistics? Because if you're right I'm definitely writing my OS in progress in Java. (I'm not being disparaging, I'm serious.)

    Quote Originally Posted by JCoder View Post
    Back to the topic: in webapps you don't need to access hardware directly. And also you usually have plenty of RAM. So C++ has no single advantage over managed languages in this case.
    Well excuse me if I don't own my own server farm.
    sudo rm -rf /

Closed Thread
Page 2 of 3 FirstFirst 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Question about what language to pick!! beginner!
    By bheijden in forum General Programming
    Replies: 2
    Last Post: 10-23-2010, 09:03 PM
  2. Question about which programming language to use..???
    By webs110733 in forum General Programming
    Replies: 2
    Last Post: 10-20-2010, 08:11 PM
  3. Another which programming language question :)
    By docesam in forum General Programming
    Replies: 7
    Last Post: 05-16-2010, 01:35 AM
  4. Language learning question
    By Andrew.G in forum C and C++
    Replies: 5
    Last Post: 06-22-2009, 08:20 AM
  5. [question]About C++ Language
    By moshe12007 in forum C and C++
    Replies: 6
    Last Post: 03-11-2008, 04:45 PM

Tags for this Thread

Bookmarks

Posting Permissions

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