5 comments on “About Mixed-Paradigm Languages Such As Java and Python

  1. With mixed paradigms, a developer really needs to learn both paradigms well in order to understand which one offers the best solution. The advantage, though, is that a developer that is used to one of the paradigms can come in and get used to a language and slowly discover the other paradigm and learn more about it that way instead of just being flung into a new paradigm and being completely lost.

    One of the issues that I’ve seen in JavaScript is the arguing that one of the paradigms is just wrong. Everyone likes to say “you should do everything functionally, cuz it’s just the right way to do it in JS because it’s a functional language” while others say “you should do everything in an object-oriented way, cuz it’s just the right way to do it in JS because it’s an object-oriented language” (technically, it’s a prototypal language but the majority of object-oriented aspects exist with prototypal inheritance). We all just need to learn how to use both and figure out the best way to combine them, because they can be used together in amazingly elegant ways.


  2. “Java doesn’t have pattern matching […]”

    Actually, Java has more than sufficient pattern matching capabilities; in fact, a lot of Java’s pattern matching is borrowed from Perl.

    If you want your pattern matching with syntactic sugar, there are always JVM languages like Groovy that help you avoid some of the explicit ceremony inherent in the way Java does it.


      • Jacob, I’m not really sure what you’re referring to when you say “pattern matching”, but I think Robert Poole is referring to Regular Expressions.


      • Yeah, I’m not talking about regex. I’m refering to how functional languages get information about values. Written in a typical OO language, it would be a series of if, else if, and else statements that would be complicated or at least ugly. Look up Functional Pattern Matching, since it’s a bit complicated to explain.
        OO languages aren’t able to completely support pattern matching due to the fact that objects are different from functional types.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s