DEV Community

Discussion on: Python vs Java

 
_hs_ profile image
HS

Yeah I know. However I do admit that I switched to Groovy and Kotlin so I'm mainly using those two not actually Java and I can say Kotlin community is not that different from Java just that they prefer to brag Kotlin is better and mostly love FP instead of OOP which is the reason I will stop using it soon probably :D. I just liked the idea to use suspend and extensions for RxJava/Reactor where you simply say .await on reactive methods and use it like impertive/procedural. That's basically the only reason I switched from it. Data classes made no difference in many ways for me except ability to use .copy.

So I would say "pattern" is not Java thing, it probably started to be a hype with C++ and the GoF through EIP and so on. Now I just heard about EIP when I started to do a lot of integrations and using Apache Camel. But I learnt quite soon I just need a lot of easy to use libraries and EIP made my life worse. So thus I'll try in free time to investigate possibility of building AEIP (anti eip) solution in Python in sense that I need nice integration but mainly from Pulsar to Pulsar in mean time enriching with extra http calls and transforming. So if anyone knows nice tool like Apache Camel but for Python and easier to use please do let me know.

Thread Thread
 
codemouse92 profile image
Jason C. McDonald • Edited

So I would say "pattern" is not Java thing, it probably started to be a hype with C++ and the GoF through EIP and so on.

It started with Gang of Four, to be sure, but that book was published in 1994, one year before the initial release of Java. Design Patterns and Java have been taught concurrently in universities for a very long time, and (perhaps resultant of that,) every Java dev I've ever known is usually the first person to utter the word "pattern" in a technical conversation.

P.S. What in they hey is EIP? Search isn't being useful, and I hate acronyms. I may know the term, but haven't yet acronymized it in my head.

Thread Thread
 
_hs_ profile image
HS

Sorry about that. EIP - Enterprise Integration Patterns. So Apache Camel and Spring integrations or even Red Hat Fuse. Looks nice then you realise enrich doesn't work as you need it today so I might consider pythonizing integrations with Pulsar. Maybe do it more dynamically and present it as AEIP as in anti enterprise integrations pattern just for fun. I thought like I only need Python to trigger certain stuff on new input from Pulsar and give it back once done with enriching and transformations so why have any other restrictions from patterns?

Thread Thread
 
codemouse92 profile image
Jason C. McDonald

Patterns are supposed to be tools, rather than set-in-stone regulations. You can implement any (or all) of the Gang of Four patterns in Python, mix-and-match, and use however you need...or use no patterns if none of them are helpful.

Thread Thread
 
_hs_ profile image
HS

Well as soon as you try your own thing with certain opinionated tools that enforce them you get my result: they look like bad guys keeping you in thin circle :D. You can, but you can see how much restrictions are in place so your better of starting from 0 and implementing them partially.

Thread Thread
 
codemouse92 profile image
Jason C. McDonald • Edited

Ergo, one reason I'm choosy about what opinionated tools I use. ;)