Object Orientation is not a Goal
来源:互联网 发布:剑三成女捏脸数据网盘 编辑:程序博客网 时间:2024/04/28 19:23
原文地址:
http://java.dzone.com/news/object-orientation-not-goal
I frequently read or hear people say something along the lines of "this or that is not properly object oriented", or "... function oriented", or something else similar to that. I used to utter the same statements, when I first came out of university. This kind of statement was also present in the article published here yesterday, titled "what we don't need in object oriented programming".
Later, in the real world, I learned the shocking truth:
We do not develop software to make it object oriented, or to comply with any other paradigm.
We develop software to solve problems.
Each programming paradigm (OO, FOP, AOP etc.) is great at solving a specific type of problems, but none of them, in my opinion, is the best at everything. Therefore, I appreciate being given the choice of tools and language constructs, rather than having them dictated to me. What kind of tools or constructs I need depends on what kind of problem I am trying to solve.
For instance, why is it that in 2010, Java still doesn't have unsigned primitive types? Whenever I find myself having to do bit manipulation, I get annoyed by this. Why have I not been given the choice of what kind of primitives to use?
Along the same line, why does Scala only have object types? If I am trying to develop some software that works on binary data, I don't want Scala to optimize for me behind the scenes. I want to control it myself. If I have to do bit manipulation of large amounts of binary data, why is it, that Scala's primitive types are immutable? So, for every manipulation I create a new instance of the type? Lame.
In general, it bothers me to see elitist developers make limiting decisions on my behalf, without knowing what problem I am trying to solve. It's like saying "We know better than you what you need, so we will prohibit this or that tool / style / construct". But the thing is, such elitist thinker do NOT know better than the individual developer, what tools or constructs he or she needs to solve a given problem. To make an analogy, this is exactly like elitist politicians who think they know best how everybody should live their lives...
To sum it up: We develop software to solve problems, and whatever it takes to solve a given problem properly, is the "right" way of doing it. At the moment, it seems to me that the only language design camp that really gets this, is the C# team. And I'm a Java fan with 11 years of Java under my belt, so it hurts to say this. It just seems to me, that they are the only language designers that truly acknowledges the fact, that I don't need to be forced to use a certain paradigm, but be given the choice myself.
- Object Orientation is not a Goal
- object is not a function
- Spring is not a distributed object model
- Uncaught TypeError: object is not a function
- 解决object is not a function
- Uncaught TypeError: object is not a function
- Property 'submit' of object #<HTMLFormElement> is not a function
- 发现运行时会报错误, Object is not a primitive:
- chrome浏览器Uncaught TypeError: object is not a function问题
- chrome浏览器Uncaught TypeError: object is not a function问题解决
- Property 'submit' of object #<HTMLFormElement> is not a function
- Uncaught TypeError: object is not a function的解决方法
- chrome浏览器提示:object is not a function
- object MailBox is not a member of package concurrent
- 解决A true SSLContext object is not available
- pip: InsecurePlatformWarning: A true SSLContext object is not available
- form.submit()提交时报错object is not a function
- chrome浏览器Uncaught TypeError: object is not a function问题
- apache禁止屏蔽ip段,在httpd.conf中的写法
- JavaScript学习摘记(实现标题左右滚动效果)
- 用maven2生成Struts2的WEB应用
- 5种方法解除开机密码
- Apache实现一个ip虚拟多个web站点
- Object Orientation is not a Goal
- 《MyBatis用户指南》----Part 4
- 计算程序运行时间
- DOM2和IE的事件传播机制(捕捉,起泡)
- 系统中hosts文件妙用
- 从故乡到深圳
- uart_get_baud_rate
- 多线程编程(7) - 从 CreateThread 说起[续五]
- 无处不抽象,从JVM内存管理想到的