从静态语言变为动态 [英] Moving from static language to dynamic

查看:181
本文介绍了从静态语言变为动态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在互联网和SO上有很多讨论,比如这里此处,有关静态和动态语言。 p>

我不会再问一个对另一个。相反,我的问题是移动(或至少试图移动)从静态类型语言到动态的。



我不是在谈论JS的适度使用您的网页或嵌入到静态类型软件或小型个人脚本中的其他脚本语言。我的意思是将动态语言作为开发团队中生产质量软件的主要通用语言。



那么容易吗?最大的优势和最大的挑战是什么?它有趣吗? :)



UPD:您是否发现IDE支持够好?您是否发现需要更少的IDE支持?

解决方案

那么容易吗?



中度。一些Java主题是破坏的习惯。我的头六个月,我写了Python。恶心。一旦我结束了,我没有回头。



最大的优势是什么?



从write - > compile - > build - > run - > break - > debug - > write循环移到write - > run - > break - > write循环。需要时间才能从Python命令行解释器立即获得满足。在尝试编写任何代码之前,我一直非常喜欢无尽的设计和规划(少得多的编译)。



起初我认为python命令行是一种教育专用界面。然后,在>>>提示符下阅读docstrings,doctests和用户指南,我开始意识到,真正伟大的Python软件可以将复杂性和细微差别归结为可以交互式输入的内容。



[我希望我可以设计干净的工作。]



最大的挑战是什么?



多重继承。我很少使用它。



是否有趣?



到目前为止。



这也是非常有成效的。更多的时间与用户要求和实际数据。较少的时间规划具有正确接口的继承层次结构,以捕获正确编译可扩展到足以持续至少下一个修订版。


There are a lot of discussions all over the internet and on SO, i.e. here and here, about static vs dynamic languages.

I'm not going to ask again about one vs another. Instead, my question is for those who moved (or at least tried to move) from static typed language to dynamic.

I'm not talking about moderate usage of JS on your web page or other scripting language embedded into statically typed software or small personal scripts. I mean moving to dynamic language as your primary general purpose language for developing production quality software in team.

Was that easy? What was the biggest advantage and the biggest challenge? Was it fun? :)

UPD: Did you find IDE support good enough? Did you find that you need less IDE support?

解决方案

Was that easy?

Moderately. Some Java-isms are hard habits to break. My first six months, I wrote Python with ;'s. Icky. Once I was over it, though, I haven't looked back.

What was the biggest advantage?

Moving from the "write -> compile -> build -> run -> break -> debug -> write" cycle to a "write -> run -> break -> write" cycle. It takes time to get used to immediate gratification from the Python command-line interpreter. I was soooo used to endless design and planning before attempting to write (much less compile) any code.

At first I considered the python command line to be a kind of "education-only" interface. Then reading docstrings, doctests, and user guides where the application is being typed at the >>> prompt, I started to realize that the truly great Python software boils complexity and nuance down to stuff you can type interactively.

[I wish I could design stuff that worked that cleanly.]

What was the biggest challenge?

Multiple inheritance. I use it very rarely.

Was it fun?

So far.

It's also amazingly productive. More time with user requirements and real data. Less time planning an inheritance hierarchy with proper interfaces to capture meaning and compile correctly and be extensible enough to last at least to the next revision.

这篇关于从静态语言变为动态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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