• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how devoted are you to OO?

 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I started out writing basic and assembly language subroutines. Then pascal then java,but it took a few years before I understood OO. It wasn't until I learned C++ I finally understood. I'm a big fan now, but now I am learning Python. It is so different. Defining functions the way we do classes. I'm not so sure it is a bad concept. We have to instaciate the entire class t0 call one method. In Python you just call the method.
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
C++ was also my introduction to OO. I have not worked with a non-OO language since (unless you count shell scripting, or markup languages).
 
Randall Twede
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The syntax is a little different too, but would you really miss the semicolons and curly brackets? ;^)
 
Randall Twede
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The book I'm reading is 10 years old, and I am only half finished reading it. I have no idea yet what has happened since.
 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Randall Twede wrote:The syntax is a little different too, but would you really miss the semicolons and curly brackets? ;^)



Perhaps it's because I'm an old fart, but the mere thought of whitespace indentation as significant makes a set of steel doors clang shut in my mind. I'm sure I could overcome that should I ever have occasion to, but something about it just seems unnatural and capricious.
 
Randall Twede
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think I don't like it for readability and maintainability. For large programs especially. Imagin 40 function definitions.at the start of your program. I'm not a Python Programmer yet. Still learning.
 
Randall Twede
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I love the lack of semis and curlies best. I used to like them.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you'd ask an OO purist, (s)he would probably tell you that Java, C++, C# and most other mainstream programming languages that call themselves "object-oriented" are not really purely object-oriented. And maybe they'll tell you that Smalltalk is the holy grail.

To answer your question "how devoted are you to OO?", I'd say I'm pragmatic and not a devotee or purist of any particular programming philosophy. As long as it has proven itself to be useful for doing my job well, I'll take it. Java isn't perfect by far but it has clearly proven its usefulness.
 
Randall Twede
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
True enough I still love java. I got tired of python for now and skipped to the section on ruby. Ruby makes java look like an OO wannabe. Everything is an object. Single inheritance. It doesn't have primitives. A number is an instance of the number class. The syntax and everything else is much more like java than python is. Like Python you don't need a semicolon, but it's optional if you want.
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's interesting to study different programming languages and learn about programming language features that you've never thought about.

Ruby has open classes, which means that in your own program you can add stuff to existing classes anywhere or even change the definition of methods of existing classes anywhere. You can do crazy things with that if you'd want to, such as redefining methods of the standard String class. People call this monkey patching. It might be useful sometimes, but if you don't use it carefully you can easily create a mess.

Have you looked at Scala? It's more OO than Java in the sense that it doesn't really have primitives; instead, it has value types which map to the JVM's primitives, but which look like objects from the source code point of view. For example, Int is a value type (which maps to the JVM's type int). You can call methods on an Int as if it's an object. Semicolons are also optional in Scala. Besides OO, it is also a functional programming language. Functional programming is a whole new and interesting world in itself.
 
Enthuware Software Support
Posts: 4817
52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
>how devoted are you to OO?
Why is that important? Why should one be "devoted" to OO or to any technology for that matter? Unless one is a PhD student doing a thesis on OO, of course
 
Randall Twede
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Scala would be my next choice, but after this book I need to learn java 8 ;^)
 
Saloon Keeper
Posts: 27796
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Having started my OO career with C++, which still retains a lot of Procedure-oriented characterstics, I tend to think of languages like C++ as Object-oriented and languages such as Smalltalk as object-based. But I'm fairly unique in that viewpoint as far as I know.

OOP is insidious, however. Although Python was originally procedure-oriented exclusively, it has acquired more and more object-oriented capabilities as it has matured (the same can be said of PHP).

OOP is not a Silver Bullet, but it does help organize complex projects into a more manageable set of entities.

Ultimately, it all boils down to discipline, whether imposed from without or within.  Object-oriented, Structured, Functional, whatever.
 
Who among you feels worthy enough to be my best friend? Test 1 is to read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic