________________________________________ Christopher R. Carlen 首席激光与电子技师 美国加州桑迪亚国家实验室 CR *************** @ BOGUSsandia.gov 注意,删除文本:RemoveThis和 " BOGUS"从电子邮件地址到回复。. I have also generally found the 2Ddiagrammatical programming language of "G" as repelling as OOP. Isuspect that it may take as much time to learn LabVIEW as Python. Inthat case the time spent on Python might be better spent since I wouldbe learning something foundational as opposed to basically just learninghow to negotiate someone''s proprietary environment and drivers.Comments appreciated.--Good day!________________________________________Christopher R. CarlenPrincipal Laser&Electronics TechnologistSandia National Laboratories CA USA cr***************@BOGUSsandia.govNOTE, delete texts: "RemoveThis" and"BOGUS" from email address to reply.星期五,2007年7月13日09:06:44 -0700,Chris Carlen写道:On Fri, 13 Jul 2007 09:06:44 -0700, Chris Carlen wrote: 也许唯一可能点击OOP的是在 某些情况下我可能更喜欢更高级别的方法来处理动态内存的分配。如果我不需要执行C的效率,那么OOP可能会更快地产生工作结果,而不是担心内存管理的细节,指针,等等。Perhaps the only thing that may have clicked regarding OOP is that incertain cases I might prefer a higher-level approach to tasks whichinvolve dynamic memory allocation. If I don''t need the executionefficiency of C, then OOP might produce working results faster by nothaving to worry about the details of memory management, pointers, etc. 这不是与OOP有关的东西。使用过程语言也可以实现自动内存管理。That''s not something tied to OOP. Automatic memory management is alsopossible with procedural languages. 但是我想知道OOP程序员是否花费了很多时间来创建类 并尝试将所有内容组织到OOP范例中,因为C $ / $ 程序员只花费编写代码?But I wonder if the OOP programmers spend as much time creating classesand trying to organize everything into the OOP paradigm as the Cprogrammer spends just writing the code? 使用OOP语言创建类和组织程序与创建结构和在C中组织程序不同。 br /> 一方面,Python是一种非常OOP的语言,因为一切都是对象。在 另一方面,可以用程序 甚至功能样式编写程序的一部分。 Python不是Java,你不必强迫 所有内容都进入类。 根据我的经验,Python可以很容易地只写代码" ;.比C更容易 因为我不需要处理这么多机器细节,不要必须管理内存,不需要额外的索引用于循环列表和 等等。并且崩溃更温和,告诉我错误是什么?而不是简单的段错误或完全搞砸了结果。 Ciao, Marc''BlackJack''RintschCreating classes and organizing the program in an OOP language isn''tdifferent from creating structs and organizing the program in C.On one side Python is a very OOP language as everything is an object. Onthe other side it is possible to write parts of the program in proceduralor even functional style. Python is not Java, you don''t have to forceeverything into classes.From my experience Python makes it easy to "just write the code". Easierthan C because I don''t have to deal with so much machine details, don''thave to manage memory, don''t need extra indexes for looping over lists andso on. And the "crashes" are much gentler, telling me what the error isand where instead of a simple "segfault" or totally messed up results.Ciao,Marc ''BlackJack'' Rintsch克里斯卡伦写道:Chris Carlen wrote: 嗨: 从我读过的OOP,我得不到它。我还发现了一些对OOP有深刻批评的 文章。我倾向于与这些文章联系起来。 然而,这些文章并不比我在撰写案例时读过的那些文件更客观。 OOP 。也就是说,什么目标 数据/研究/研究表明程序员可以更快地解决特定问题,或者解决方案更有效通过OOP实现执行时间/内存使用时与程序相比 编程? 对我来说问题是我有在C和.asm中广泛编程,然后在1988年回到PC $ DOS.然后,在OOP普及的时候,没有编程好近10年。 。从1999年开始我回到了 编程,但是PC编程的高级别和OOP的完全外语的 击退了我。我的工作是模拟和数字电子硬件设计,所以很自然地我开始使用.asm和C中的微控制器工作。我的大部分工作都涉及低级别的工作。 /> 信号调节和实时控制算法,所以C大约是高水平的,因为人们可以在不严重失去效率的情况下前进。 接近C的机器在这里是理想的。这是一个我真正喜欢并且很舒服的领域。 因此,作为硬件设计师而不是计算机科学家,我是 的条件是像机器一样思考。我认为这是主要的原因 为什么OOP总是击退我。Hi: From what I''ve read of OOP, I don''t get it. I have also found somearticles profoundly critical of OOP. I tend to relate to these articles.However, those articles were no more objective than the descriptions ofOOP I''ve read in making a case. Ie., what objectivedata/studies/research indicates that a particular problem can be solvedmore quickly by the programmer, or that the solution is more efficientin execution time/memory usage when implemented via OOP vs. proceduralprogramming?The problem for me is that I''ve programmed extensively in C and .asm onPC DOS way back in 1988. Then didn''t program for nearly 10 years duringwhich time OOP was popularized. Starting in 1999 I got back intoprogramming, but the high-level-ness of PC programming and thecompletely foreign language of OOP repelled me. My work was in analogand digital electronics hardware design, so naturally I started workingwith microcontrollers in .asm and C. Most of my work involves low-levelsignal conditioning and real-time control algorithms, so C is about ashigh-level as one can go without seriously loosing efficiency. Theclose-to-the-machine-ness of C is ideal here. This is a realm that Itruly enjoy and am comfortable with.Hence, being a hardware designer rather than a computer scientist, I amconditioned to think like a machine. I think this is the main reasonwhy OOP has always repelled me. 为什么? 我用C ++编写了大量内容,包括硬实时编程 $用于DARPA Grand Challenge车辆的QNX下的C ++中的b $ b。我有一个Atmel AVR,现在我的桌子上插着JTAG端口的电缆。 即使是那个小东西也可以用C ++编程。 有时你可以在C ++中获得比在C中更好的性能,因为C ++ 如果它有状态和函数,它可能应该是一个对象。 br /> 对象的实例在C ++中可以是静态的;动态内存 $ c $ b在C ++中不需要分配,就像在Python中一样。 Python是一种相对简单的语言,比C ++,Java更容易, 甚至是Perl。这是非常宽容的。然而,主要的实现,即 CPython,比C慢大约60倍,所以如果你正在尝试实现一个快速变化的数字示波器显示器, 结果可能会很迟钝。 John NagleWhy?I''ve written extensively in C++, including hard real-time programmingin C++ under QNX for a DARPA Grand Challenge vehicle. I have an AtmelAVR with a cable plugged into the JTAG port sitting on my desk right now.Even that little thing can be programmed in C++.You can sometimes get better performance in C++ than in C, because C++has "inline". Inline expansion happens before optimization, so youcan have abstractions that cost nothing.If it has state and functions, it probably should be an object.The instances of the object can be static in C++; dynamic memoryallocation isn''t required in C++, as it is in Python.Python is a relatively easy language, easier than C++, Java,or even Perl. It''s quite forgiving. The main implementation,CPython, is about 60x slower than C, though, so if you''re tryingto implement, say, a rapidly changing digital oscilloscope display,the result may be sluggish.John Nagle 这篇关于低级程序员可以学习OOP吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-21 15:19