具有多种语言的等效功能的网站
学习(或重新学习)语言时,需要花费大量时间来学习执行基本操作的函数。例如,假设我想反转一个字符串。在一种语言中,它可能很简单,如myString.reverse()
。在 Python 中,它是 myString[::-1]
。在其他语言中,您可能必须创建一个数组,迭代字符串并以相反的顺序添加所有字符,然后将其转换回字符串。非常有用的是一个参考,这样如果你知道一种语言的函数名称,那么我就可以找到另一种语言的等效名称。目前,谷歌搜索或搜索 StackOverflow 似乎并不能很好地解决这个问题,因为您通常必须尝试大量不同的查询。我想我正在考虑某种维基系统。有没有这样做的网站?
When learning (or relearning) a language, a significant amount of time goes into learning the functions for doing basic operations. For example, suppose I want to reverse a String. In one language, it may be simple as myString.reverse()
. In Python, it is myString[::-1]
. In other languages, you may have to create an array, iterate through the string and add all the characters in reverse order and then convert it back to a string. What would be extremely useful would be a reference so that if you know the name of the function in one language, then I could find the equivalent in another. Googling or searching StackOverflow don't seem to solve this problem very well at the moment, as you have to usually try a large number of different queries. I guess I am thinking of some kind of Wiki system. Are there any websites that do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来您正在寻找 Rosetta 代码。事实上有一个关于反转字符串的页面。
It sounds like you're looking for Rosetta Code. There is in fact a page on reversing a string.