为什么是 darcs 而不是 git?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2497053/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 04:11:09  来源:igfitidea点击:

Why darcs instead of git?

gitversion-controldarcs

提问by Tim Matthews

Using pure functional languages can have a lot of benefits over using impure imperatives, but low level systems languages will generally allow you to achieve much greater performance, especially when they are imperative because it allows you to specify the exact steps in how the cpu should compute the result.

使用纯函数式语言比使用不纯的命令式有很多好处,但低级系统语言通常会让你获得更高的性能,尤其是当它们是命令式的时候,因为它允许你指定 cpu 应该如何计算的确切步骤结果。

If there is ever list of tools where high performance is an absolute must then I would put VCS at the top of that list, and git achieves this very well. However performance is not git's only advantage over many other other types of version control systems anyway.

如果有绝对必须具备高性能的工具列表,那么我会将 VCS 放在该列表的顶部,而 git 可以很好地实现这一点。然而,性能并不是 git 与许多其他类型的版本控制系统相比的唯一优势。

The git team is handling the unsafe c code very well, and I never worry about my type system (or any other features of the language it is written in), so why is it that there is a lot of haskell developers that must use darcs when they will only be using the finished product?

git 团队对 unsafe c 代码处理得很好,我从不担心我的类型系统(或它所写语言的任何其他特性),那为什么有很多 haskell 开发人员必须使用 darcs他们什么时候只使用成品?

采纳答案by mfperzel

I think in general certain communities of users will gravitate towards one technology or another. This is especially true if a technology uses the community's language. It is also possible(though I have no idea) that the author and/or initial users of Darcs were fairly well known Haskell developers, thus having more influence.

我认为一般来说,某些用户社区会倾向于一种或另一种技术。如果一项技术使用社区的语言,则尤其如此。也有可能(虽然我不知道)Darcs 的作者和/或初始用户是相当知名的 Haskell 开发人员,因此具有更大的影响力。

There are other examples, such as Mercurial appears to be more popular in the python community while other languages appear to use Git.

还有其他例子,例如 Mercurial 似乎在 Python 社区更受欢迎,而其他语言似乎使用 Git。

Once you are using a particular piece of software it may not be worth it to switch to another even if there are advantages.

一旦您使用了特定的软件,即使有优势,也可能不值得切换到另一个软件。

Honestly though use whatever you like best. At this point it is almost a requirement to have hg, git, and svn installed and know the basics to using them. If you are using Haskell it appears you probably need to add Darcs to this list.

老实说,尽管使用您最喜欢的任何东西。在这一点上,几乎需要安装 hg、git 和 svn 并了解使用它们的基础知识。如果您使用 Haskell,您可能需要将 Darcs 添加到此列表中。

回答by Mark Stosberg

Darcs manages collections of patches instead of chronological history. More about this is on the darcs wiki page documenting differences with Git. This difference is illustrated by a darcs ability to pull patches interactively, out of order. For example, you could pull all patches with a commit title that matched a ticket number from from "development" to "testing". Darcs would automatically make sure any other pages these patches depended on were pulled as well. With this key feature, you may need far fewer branches and repos to maintain. While in Git it's very helpful to create a branch before doing work, in Darcs that's often not a concern, as long as long as you give your related commits mention the same ticket number. I used a workflow based on this extensively with a 100,000k LoC project. Besides that technical difference, darcs is very user-friendly. There are fewer commands, and most are interactive by default, prompting you about what to do.

Darcs 管理补丁集合而不是按时间顺序排列的历史。有关此内容的更多信息,请访问darcs wiki 页面,该页面记录了与 Git 的差异. 这种差异可以通过 darcs 以交互方式、无序地拉取补丁的能力来说明。例如,您可以拉取提交标题与从“开发”到“测试”的票号匹配的所有补丁。Darcs 会自动确保这些补丁所依赖的任何其他页面也被拉取。有了这个关键特性,你可能需要更少的分支和仓库来维护。虽然在 Git 中在开始工作之前创建一个分支非常有帮助,但在 Darcs 中这通常不是问题,只要您提供相关提交并提及相同的票号即可。我在一个 100,000k 的 LoC 项目中广泛使用了基于此的工作流程。除了技术上的差异之外,darcs 非常用户友好。命令较少,并且默认情况下大多数是交互式的,提示您要执行的操作。

Because of darcs strengths and ease of use, I much prefer it over git, which I also use regularly for open source projects. Darcs is easy enough to use that even if you have to learn git to contribute to some projects, you may still enjoy and benefit from using darcs on other projects where you have a choice.

由于 darcs 的优势和易用性,我更喜欢它而不是 git,我也经常在开源项目中使用它。Darcs 使用起来非常简单,即使您必须学习 git 才能为某些项目做出贡献,您仍然可以在其他可以选择的项目中使用 darcs 并从中受益。