Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

I'd like to learn Jython

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the current version of Netbeans.

I'll be asking lots of questions.

So, here I go!
Can I mix Python AND Java code in the same program? Do I need to insert "transition" code between Python code & Java code & vice versa?

I know that each class in Java is a separate file. I suppose that the same thing can be done with Python, right?

If I can accomplish what I want to do with Python code instead of Java code, I'll use Python code.
 
Marshal
Posts: 25682
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From what I just read in the Wikipedia article:

Jython programs can import and use any Java class.

Jython programs can be compiled to Java bytecode, which means that a Java class can import and use a compiled Jython program.

So to me that implies you don't need any glue, the connections are seamless. (Sorry for the mixed metaphor.)

And, welcome to the Ranch!
 
David Clark
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Python isn't as verbose as Java. That's what initially intrigued me. I went to Barnes & Noble & looked thru books on Python.

I've spent hours on YouTube & the internet researching Python. But, after doing my research, I'm not as enthusiastic as I once was.

There's no concept of constants as there is in other programming languages.

I don't like the frequent use of "self". I played around with a Python demo on Netbeans & the compiler frequently complained that the indentation was wrong. I don't like the "_init_". In the demo was "self.x = x" & "self.y = y". So, I substituted "x" for "self.x" & "y" for "self.y" & the compiler complained.

I want to learn Java & other languages that run in the Java VM, like Groovy & Kotlin & maybe, maybe, Scala.

I have both Netbeans & intellij IDEs on my Mac. I tried to set up Groovy on Netbeans & it complained about missing Groovy Docs & something else. On Netbeans I see no way to create a Groovy project. There's only a Grails Project. So, I'll experiment with Groovy on intellij. Intelij also has Kotlin.

So, I'll research Kotlin & Groovy.
 
Bartender
Posts: 9615
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

David Clark wrote:
Python isn't as verbose as Java...There's no concept of constants as there is in other programming languages.



A reduced feature set is how Python accomplishes being less verbose.  You'll run into similar compromises with any "scripting" language.

David Clark wrote:
I played around with a Python demo on Netbeans & the compiler frequently complained that the indentation was wrong.



That's a common complaint of people new to Python.  Of course, one should correctly indent their source code no matter the language.  

David Clark wrote:I don't like the frequent use of "self". I don't like the "_init_".



You can write procedural or functional Python code without ever using it.  One only uses "self" with object-oriented code.   There is similar functionality in other languages, like "this" in Java.  Same goes with "__init__", which corresponds to constructors in Java.

David Clark wrote:So, I'll research Kotlin & Groovy


Good luck.  We have a Groovy forum and a Kotlin forum if you need a hand!
 
Yeah, but how did the squirrel get in there? Was it because of the tiny ad?
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic