我应该使用哪种语言? [英] Which language should I use?

查看:107
本文介绍了我应该使用哪种语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将为刚刚加入的技术创业公司生产原型,并且我正在尝试确定使用哪种语言.这将是一个简单的Web工具,后台有一个MySQL数据库,中间还有一些AI东西.过去,我已经使用了相当数量的Ruby和PHP,但是想知道我是否最好还是使用Python甚至Perl.我的主要编程经验是使用C/C ++/Java,但由于我正在开发原型,所以我觉得自己想要做的事情会使我的生活尽可能轻松.

I'm about to produce a prototype for a technology startup that I've just joined, and I'm trying to decide which language to use. It's going to be a simple web tool with a MySQL database in the background and some AI stuff going on in between. I've used Ruby and PHP a reasonable amount in the past, but wonder whether I might be better off going with Python or even Perl. My main programming experience is with C / C++ / Java, but I feel like I want to go for something that will make my life as easy as possible since I'm just developing a prototype.

我猜我在寻找什么:

  • 发展速度
  • 现有的AI库(例如SVM,神经网络,贝叶斯分类器)
  • 易于与Web界面进行交互

有人对此有任何想法吗?

Anyone have any thoughts on this?

推荐答案

是否具有原型,如果要处理大量数字,至少对于AI部件,可能需要Java或C/C ++的速度.我真的不确切知道您在做什么,但是很多AI东西都是计算密集型的.您可能会发现Python VS C的差异从10分钟到将近2个小时或更长时间(或者从一天到一个月).

Prototype or not, if you are crunching huge amounts of numbers, you may need the speed of a Java or C/C++ at least for the AI parts. I don't really know exactly what you are doing but a lot of AI stuff is computation intensive. You may find Python VS C makes a difference from 10 minutes to almost 2 hours or more (or from a day to a month).

也许最好的选择是混合方法. Java/C ++或用于AI的东西(我之所以只说Java是因为它有大量的库,我什至有一本关于数据挖掘的书,它讨论了Java中可以免费使用并执行某些技术的几个库).还有Python/Ruby/Perl和其他功能(例如Web部件).

Probably your best bet is a hybrid approach. Java/C++ or something for the AI (I only say Java because it has a ton of libraries, I even have a book on Data Mining which discusses several libraries in Java that are freely available and perform some of the techniques). And Python/Ruby/Perl for everything else (like the web parts).

我不愿意推荐PHP,因为您永远不知道自己在做什么. PHP似乎确实在网络上以及与网络相关的事物上闪耀,但是一旦您需要非网络使用,它似乎比任何东西都要麻烦(尽管我已经看到PHP像Perl/Python/etc一样被正常使用.脚本语言).

I am hesitant to recommend PHP because you never know what you may be doing. PHP seems to really shine on the web and for web related things, but once you need non web uses it seems to be more cumbersome than anything (although I have seen references to PHP being used like a Perl/Python/etc. as a normal scripting language by some people).

在Python/Ruby/Perl之间进行选择几乎是一个品味问题.除了Perl具有CPAN之外,CPAN已经超越了Python和Ruby所具有的能力.由于您尚处于起步阶段,因此您可以将CPAN上的各种模块拼凑在一起,这可以为您早日完成工作提供价值.我个人比较喜欢Perl上的Python(在构建自己的对象时,我发现Perl的对象系统很难看,有时我需要花点时间才能弄清几个月前编写的代码是如何工作的).但是我不能否认CPAN的价值.

The choice between Python/Ruby/Perl is almost a matter of taste. Except that Perl has CPAN which is beyond anything Python and Ruby have right now. Since you are in a start up, the wide selection of modules on CPAN that you can just slap together may provide value to you in getting things done sooner. Personally I like Python over Perl (I find Perl's object system to be ugly when building your own objects, and sometimes it takes me a bit to figure out how code I wrote months ago works). But I can't deny the value of CPAN.

因此,简而言之,您可能需要一些用于AI的性能语言,以及针对其他所有语言的脚本语言开发的便捷性和速度,因为启动只是要尽快完成产品并击败它.您的竞争对手进入市场.我想推荐Python,但是根据我对初创公司的了解,您需要在决策过程中评估CPAN.能够将一堆模块快速完成所需的操作,对于启动来说具有巨大的价值.

So in short, you probably need a performance language for some of the AI stuff and the ease and speed of development of a scripting language for everything else because a start up is all about getting the product done as soon as possible and beating your competitors to market. I would love to recommend Python, but based on what I know about start ups, you need to evaluate CPAN in your decision process. Just being able to slap a bunch of modules together that do what you want quickly can be of huge value in a start up.

我还应该补充一点,Perl和Python(我不确定Ruby,但我认为这样做)可以相当轻松地调用C代码.因此,您可以通过创建与该语言的绑定集来使用C或C ++库.您也可以尝试用Perl/Python/Ruby编写整个程序,如果它太慢,则用C或C ++重写该部分并从脚本语言中调用它.在整个启动过程中,要完成某件事,像这样的重写可能会非常昂贵.另外,由于您最熟悉C,C ++或Java,因此从一开始就值得一试.

I should also add that Perl and Python (I'm not sure about Ruby but I think that to) can call C code rather easily. So you could use C or C++ libraries by creating a set of bindings to the language. You could also try writing the whole thing in Perl/Python/Ruby and if it is too slow rewriting that part in C or C++ and calling it from the scripting language. With the whole start up thing rewriting like this can be very expensive in terms of getting something done. Also since you are most comfortable in C or C++ or Java it may be worth just going there from the start.

这篇关于我应该使用哪种语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆