对于非常喜欢LISP的人,请提供有关Ruby vs Python的建议 [英] Please advise on Ruby vs Python, for someone who likes LISP a lot

查看:108
本文介绍了对于非常喜欢LISP的人,请提供有关Ruby vs Python的建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是C ++开发人员,正在慢慢进入Web开发.我非常喜欢LISP,但是不喜欢AllegroCL和可用于LISP的Web框架.我正在寻找更多的自由度和能力,以便在语言层面上进行出色的技巧.我不认为标签是对自然的犯罪.

I am a C++ developer, slowly getting into web development. I like LISP a lot but don't like AllegroCL and web-frameworks available for LISP. I am looking for more freedom and ability to do cool hacks on language level. I don't consider tabs as a crime against nature.

哪个更接近LISP:Python还是Ruby?

Which one is closer to LISP: Python or Ruby?

我似乎无法从Python和Ruby中进行选择:它们看起来非常相似,但显然Ruby更具功能性和面向对象,这是一件好事,而Python则更像Perl:一种简单的脚本语言.我有正确的印象吗?

I can't seem to be able to choose from Python and Ruby: they seem very similar but apparently Ruby is more functional and object-oriented, which are good things, while Python is more like Perl: a simple scripting language. Do I have the right impression?

PS-这可能看起来像是火焰诱饵,但事实并非如此,我只是想避免从OCD着迷于从RoR切换到Python/Django再返回.

PS - This might seem like a flame bait but it's not really, I'm just trying not to go crazy from OCD about switching from RoR to Python/Django and back.

推荐答案

我会选择Ruby.它具有各种元编程和鸭子打孔技术,可以很容易地进行扩展.像块之类的功能乍看起来可能并不多,但是如果正确使用它们,它们将构成一些非常干净的语法.如果将开放类搞砸了,它们可能会调试地狱,但是如果您是一个负责任的程序员,则可以非常轻松地完成2.days.from_now(来自Rails的示例)之类的事情(我想Python也可以做到)更多的痛苦)

I'd go with Ruby. It's got all kinds of metaprogramming and duck punching hacks that make it really easy to extend. Features like blocks may not seem like much at first, but they make for some really clean syntax if you use them right. Open classes can be debugging hell if you screw them up, but if you're a responsible programmer, you can do things like 2.days.from_now (example from Rails) really easily (Python can do this too, I think, but with a bit more pain)

PS:查看为什么Ruby是可接受的LISP"..

这篇关于对于非常喜欢LISP的人,请提供有关Ruby vs Python的建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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