简体   繁体   English

VCL / Delphi / BCB-我应该使用哪种IDE /语言?

[英]VCL/Delphi/BCB - which IDE/language should I use?

I bought Delphi 1 when it came out - and was hooked. 我买了Delphi 1时就买了-迷上了。 When BCB came out (around D3, iirc), I switched, mainly because I have used C/C++ professionally for a few decades. 当BCB出现时(大约在D3,iirc左右),我切换了,主要是因为我几十年来一直专业地使用C / C ++。

I have "been away" for 7 or 8 years and am now returning. 我已经“离开”了7或8年,现在正在返回。 I still have BCB 6 & Delphi 7 (not to mention Kylix). 我仍然有BCB 6和Delphi 7(更不用说Kylix)了。

I always felt more comfortable with C++ than Pascal - purely because of work-day familiarity. 与Pascal相比,我总是对C ++感到更舒服-纯粹是因为对工作日的熟悉。 But, realistically, iirc, most 3rd party VCL components are coded in Delphi/Pascal. 但是,实际上,iirc,大多数第三方VCL组件都是用Delphi / Pascal编码的。 And I think I used to have problems debugging Delphi components from BCB, but I could well remember wrongly. 而且我认为我以前在从BCB调试Delphi组件时遇到问题,但我很可能记错了。

Anyhoo, now I am back and intend to use VCL components / hack the code of same / debug them & code a few of my own. Anyhoo,现在我回来了,打算使用VCL组件/破解相同的代码/调试它们并自己编写一些代码。

Given that I am slightly more comfortable with C++, is there any compelling reason to choose Delphi over BCB, or is this just a case of how long my particular piece of string is? 考虑到我对C ++的适应程度稍高,是否有令人信服的理由选择Delphi而不是BCB,或者这仅仅是我的特定字符串有多长时间的一种情况?

I think it really depends on what your goals are more than anything else. 我认为这实际上取决于您的目标比什么都重要。

Are you trying to market your skills ? 您是否正在尝试推广自己的技能? Go C++ or, better, drop Delphi/BCB and go C# (it's cheaper and easier to market even if arguably not as efficient). 使用C ++或更好的方法是删除Delphi / BCB并使用C#(即使可以说效率不高,它也更便宜,更容易上市)。

Are you writing a product you want to sell and maintain yourself ? 您是否正在编写要销售和维护自己的产品? I'd say go with what you're more comfortable with but the point is that the VCL market pretty much sees BCB as a second-class citizen. 我想说的是您更满意的地方,但问题是VCL市场几乎将BCB视为二等公民。 It'll be harder to maintain in the long run so it will depends on the expected life cycle of your products. 从长远来看,它将很难维护,因此这取决于产品的预期寿命。

Do you just want to write for your pleasure ? 您只是想写点乐子吗? Go with whatever you like best, really. 真的,随您喜欢。 Nowadays, it's often harder to learn the framework than the language so since both Delphi and BCB share the same one, you won't lose too much time investment if you change later on. 如今,学习该框架通常比使用该语言更难,因此,由于Delphi和BCB共享同一个语言,因此以后进行更改不会浪费太多时间。

Finally, if you're starting a business and expect others to have to maintain and extend your code later on, do go with something else and pick a product where finding competent programmers isn't that hard (C#, java, PHP) 最后,如果您要开展业务并且希望其他人以后必须维护和扩展您的代码,请尝试其他事情,并选择在寻找合格的程序员并不困难的产品(C#,java,PHP)

I would say use the language you are more comfortable with. 我会说使用您更喜欢的语言。

Delphi does tend to get a more attention from Embarcadero, BCB (ECB?) was seriously neglected for some years in the mid-noughties but seems to have been fully rehabilitated since the buyout a couple of years ago. 德尔福的确会引起Embarcadero的更多关注,BCB(ECB?)在上世纪90年代中期被严重忽视,但自几年前买断以来似乎已经完全恢复了正常。

I'm originally a C++Builder user, but I have come to learn and love the Delphi language. 我最初是C ++ Builder用户,但是我已经开始学习和喜欢Delphi语言。 I use both frequently, each in its own domain: I prefer Delphi for UI-centric code (components) or when I want to use modern language features (generics, anonymous methods, RTTI, class polymorphism), but C++Builder when I need to interface with 3rd-party C or C++ code (which happens frequently). 我经常在各自的领域中使用这两种方法:我更喜欢使用Delphi来编写以UI为中心的代码(组件),或者当我想使用现代语言功能(泛型,匿名方法,RTTI,类多态性)时使用C ++ Builder需要与第三方C或C ++代码交互(这经常发生)。 Even when using C++Builder, I can write a part of my application in Delphi. 即使使用C ++ Builder,也可以在Delphi中编写应用程序的一部分。

My suggestion would be to generally prefer Delphi for component development. 我的建议是通常更喜欢使用Delphi进行组件开发。 You can use Delphi components in both Delphi and C++Builder; 您可以在Delphi和C ++ Builder中使用Delphi组件。 components written in C++ restrict you to C++Builder. 用C ++编写的组件将您限制为C ++ Builder。

The newer IDEs (BDS 2006 and above) have both Delphi and C++Builder integrated. 较新的IDE(BDS 2006及更高版本)同时集成了Delphi和C ++ Builder。 Debugging Delphi code in a C++ application now is a breeze. 现在,在C ++应用程序中调试Delphi代码变得轻而易举。

However, if you already have existing components written in C++, I'd just maintain them in C++Builder. 但是,如果您已经有用C ++编写的现有组件,那么我只需要在C ++ Builder中进行维护即可。 There's no reason to migrate them over to Delphi unless you want to consume them from Delphi as well. 除非您也想从Delphi中使用它们,否则没有理由将它们迁移到Delphi。

Being a C++ developer myself I have spend great time with the C++ Builder (BCB), it is an excellent tool for rapid application development. 作为我自己的C ++开发人员,我在C ++ Builder(BCB)上花费了很多时间,它是快速进行应用程序开发的出色工具。 The VCL framework has its obvious advantages, and provides a C++ developer with an excellent tool for building applications rapidly. VCL框架具有其明显的优势,并为C ++开发人员提供了一个快速构建应用程序的出色工具。 Obviously a lot of things has happened over the last couple of years, and the competing frameworks have grown way more mature, wxWidgets and Qt to mention two are both providing a lot of what VCL provides, but does so while maintaining compiler independence. 显然,在过去的几年中发生了很多事情,并且竞争的框架已经变得越来越成熟,wxWidgets和Qt都提到了两者,它们都提供了VCL提供的许多功能,但是这样做却保持了编译器的独立性。

I find this is extremely important for a few reasons: 我发现这非常重要,原因如下:

  1. Firstly the Borland/Codegear/Embarcardero C++ compiler lacks a lot of the more modern features of many competing compilers. 首先,Borland / Codegear / Embarcardero C ++编译器缺少许多竞争性编译器的许多更现代的功能。 It is not as standard compliant as many other compilers, I can't count the number of problems I used to have compiling the boost libraries in BCB, although they seem to have fixed many of those problems. 它不像许多其他编译器那样标准兼容,我无法计算曾经在BCB中编译boost库的问题数量,尽管它们似乎已经解决了许多问题。

  2. Secondly I must admit that I have a shed of doubt concerning the Embarcardero commitment to the BCB product. 其次,我必须承认,我对Embarcardero对BCB产品的承诺存有疑虑。 It is my personal belief that the BCB product is only used by a very marginal audience, and isn't bringing in enough money to keep the product properly maintained, at least compared to its Delphi relative. 我个人认为,只有很少的受众使用BCB产品,至少与相对于Delphi的产品相比,它没有带来足够的资金来保持产品的正确维护。 I fear the BCB product will cease to exist within the next 3-4 years. 我担心BCB产品在未来3-4年内将不复存在。 I must emphasize though that this is my own personal fear, and only based on guesses. 但我必须强调,这是我个人的恐惧,仅基于猜测。

  3. The first two combined provides a worst case scenario where you are stuck with a framework where switching compiler can turn out to be impossible. 前两者的结合提供了最坏的情况,即您陷入一个框架,在该框架中切换编译器可能变得不可能。 The Delphi compiler however I believe will be around for much longer, given the (guessed) larger userbase, the performance of the compiled code will be close to that of the BCB but with a larger userbase the amount of support to get, will be larger, and easier to find. 但是,我认为Delphi编译器的使用时间会更长,因为(猜测的)用户群更大,因此编译后的代码的性能将接近BCB,但随着用户群的增加,获得的支持量将会更大。 ,而且更容易找到。

Having said all that, I still like the BCB, and as mentioned by Stephane it really boils down to what you need. 说了这么多,我仍然喜欢BCB,正如Stephane所说,它确实可以归结为您的需求。 Since you are determined to use the VCL it will probably not be important to find a more cross compiler based framework, or perhaps you have already done those considerations. 由于您确定要使用VCL,因此找到一个更加基于交叉编译器的框架可能并不重要,或者您可能已经考虑了这些因素。

If you like the C++ language then I'd use the BCB, if you like a language with a larger userbase, and where support is easier to find in that language I'd choose Delphi. 如果您喜欢C ++语言,那么我会使用BCB,如果您喜欢具有更大用户群的语言,并且在该语言中更容易找到支持的地方,我会选择Delphi。 But then again, most likely you will have bought the RAD Studio and have both compilers, then why limit your self to one language? 但是话又说回来,很可能您会购买RAD Studio并拥有两个编译器,那么为什么将自己限制为一种语言? If you already know one language switching to another language should be quite easy. 如果您已经知道一种语言切换到另一种语言应该很容易。 Especially when the language you know is C++, and in particular when you have worked with Delphi before as well. 尤其是当您知道的语言是C ++时,尤其是您之前也使用过Delphi时。

I like to say that you have to choose the right tool for the right job. 我想说的是,您必须为正确的工作选择正确的工具。 Therefore perhaps the question shouldn't be what tool should I use, but what tool fits this particular job, if you are planning on writing high performance code utilizing lots of multithreading preferably optimized for multicore architectures, then most likely it will be neither BCB nor Delphi that you will be looking for. 因此,也许问题不应该是我应该使用哪个工具,而是哪个工具适合该特定工作,如果您打算使用大量针对多核体系结构进行了优化的多线程编写高性能代码,那么很可能既不是BCB,也不是BCB。您将要寻找的Delphi。 If you are looking for cross platform development, and you don't like the idea of Java, then perhaps the Pascal language in the shape of the Freepascal/Lazarus combination will be your best bet. 如果您正在寻找跨平台开发,并且您不喜欢Java的想法,那么Freepascal / Lazarus组合形式的Pascal语言可能是您的最佳选择。

If you want to develop applications rapidly, like to utilize databases, want to have a fancy GUI window and don't really mind some code overhead, then I guess your bet on the VCL framework might be the best choice for you, and to be honest all things considered, it doesn't really matter whether it is BCB or Delphi you use in that case. 如果您想快速开发应用程序,例如利用数据库,希望拥有精美的GUI窗口,并且不介意一些代码开销,那么我想您对VCL框架的选择可能是您的最佳选择,坦白地说,考虑到所有情况,在这种情况下使用的是BCB还是Delphi都没有关系。

So if all other considerations boils down to a few choices where they are technically even candidates, choose the one you like the most, and feel you are most productive in. 因此,如果所有其他考虑都归结为从技术上甚至是候选人的几个选择,请选择最喜欢的一个,并觉得自己最有生产力。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM