7

Can someone tell me why C++ and python are so widely used in the AI department? I kind of understand… you want maximum performance (plus GPU) with C++ or easy logic with Python but still, it seems like other languages would still have there benefits in AI. It just doesn't make sense to me, why isnt it like every single other part of computer science where everyone under 22 thinks "now this is what JavaScript was made for!" (I mean js is used so much in other parts of cs, why not AI). Am I missing something? Maybe the resources are missing for AI in other languages? Can someone please expand

Comments
  • 7
    Python == data science? Numpy, SciKit, other math libraries, Tensor Flow

    Plus it's just the language that professors n non tech people seem to understand faster
  • 2
    @billgates I never got that. I quit programming and went for web dev just because as a beginner, I hated python so much.
  • 5
    @calmyourtities JS is still programming though?
  • 3
    @billgates yes but the simple way I could interact with the DOM made me love it, now that I know more now not so much, but it made so much more sense. Oh, you want input? Simple: var input = prompt("yay js"); But if I want it on python? input = str(input()) oh wait! wrong version, input = raw_input(), wait, you forgot to change the data type! input = str(raw_input()) oh no! you son of a bitch you have 1 too many spaces! Im python and I can't ignore that fuck you beginner programmer is about how it felt, I barely got to understand it till I decided to try it again once I got my raspberry pi two years later, but just my personal point of view
  • 3
    My understanding of programming languages is this:

    OOP: Java, C#
    Functional: Scala
    Hybrid/Interpreted/Scripting: Python, JS
    Low Level: C, C++, Assembly

    Jumping between the categories kinda needs a paradigm shift/learning curve... Some more than others...

    But within, it's mostly just syntax
  • 2
    @billgates I hate pythons syntax. sure, i get it, you want a language thats easy to read. but you dont have to *force* it on people. I want braces, or something, it's not like it's impossible to write ugly python code, so stop trying to make it!
  • 1
    @calmyourtities guess you've never used VB(A)

    But yes I suppose I've seen so many languages I can switch pretty easily as long as I can remember some key rules of each.

    Current job I need JS, Java, C#, Python, Batch and Shell script

    Compared to the last 2, Python is like Heaven and 2.7 now comes in most Linux OSs
  • 1
    @billgates yes, it would be hell to use batch or shell scripts as a server backend. I do like the language monkey x and I don't really like their syntax, but I suppose I will get used to it.
  • 3
    Just because you could, doesn't mean you should. Keep in mind that in cases like these performance is crucial, but it's also about resource and code bloat: can you scale javascript to run parallel, independent tasks on 10 cpu cores? How about 1000?

    You probably could, but I imagine it would be hell, both for the programmer writing the code and for the machine running it
  • 1
    @calmyourtities braces are indeed good thing. To me, it makes code easier to follow and understand
  • 2
    I think this comes from the research done. Research in AI is mostly done on university and other research groups. And python and c++ is a language that is used very much in that area. There are also a framework in Matlab for ai stuff.

    Javascript is not a language that is developed by universities and such has a number of problems in logic and speed. (I'm not saying that python and c++ doesn't have problems but not in the area of speed(c++) and logic(python)) so in a lot of university project python is used for developing something fast and c++ is used for improving the python version.

    The research world isn't that big, thus if someone develops a language or uses 1 then it get copied and spread very quickly in that world.

    I think that is mostly the reason that python and c++ is used. If it is a correct choice is off course very debatable, but that is flame war material ;)
  • 0
    Just saw this in my email...

    http://kdnuggets.com/2017/08/...
Add Comment