the trailboss abuses his CodeRanch power for his other stuff (power corrupts. absolute power corrupts absolutely is kinda neat!)
permaculture light bulbs permaculture electric heat permaculture cast iron permaculture wood burning stove permaculture solar food dehydrators
  • 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
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Joe Ess
  • salvin francis

moving away from Java towards something new. What? D, rust, go? something else

 
Rancher
Posts: 4686
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers.

After about 20 years of writing professional Java code (and enjoying time here at the ranch), I retired. No more JSP, servlets, etc. for me.

But I'm a programmer by heart. So I'm working up specs for a small application to build as a hobby in my retirement. The number one requirement is that I not use any Java in its development.

So what languages should I consider? So far, I have looked at scala, 'd', go and rust. of these, 'go' and 'rust' are looking the most interesting. This of course, is based on extensive analysis and research, specifically about two days of looking at youtube videos on the languages. So I am an expert for sure.

What languages are people using or looking at?

My criteria:
1) a language designed for production programs, so quick and dirty programs like php or ruby are excluded
2) must allow normal programmers to write parallel code for multi-core computers (like every smartphone in the world) and network of computers (like AWS and other cloud services)
3) must compile quickly so the edit/compile/debug loop is fast (eliminates C++)
4) must be able to talk to a database/datastore without requiring a PhD. database may be SQL or NoSql or whatever

When I last looked at this, #2 eliminated both Java and Python. (Yes, I know Henry can write multi-core code in Java, but he is smarter than the average bear). Python had one-big-global-lock, which kinda eliminates the advantage of having 4, 16, or 64 cores.
 
Sheriff
Posts: 4709
309
IntelliJ IDE Python Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pat,

I've recently been enjoying exploring Erlang and to a lesser extent Elixir. They are functional languages so implicitly eliminate shared state such as the 'one-big-global-lock' you found in Python and they also tick all of your criteria.

I recommend starting with the online tutorial Learn You Some Erlang for Great Good.

Happy coding!
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Multi-threaded programming is just hard. You've already looked at Scala - have you also looked at Akka and the actor model? It takes multi-threaded programming to a higher level, where you don't have to be concerned with low-level details, be careful with synchronization all the time etc. Your program consists of a bunch of "live objects" (actors) that communicate by sending messages to each other. Actors in Akka are lightweight, which means you can create a massively parallel system by creating lots of actors that are all working in parallel.

The idea of actors was originally implemented in Erlang, which Tim mentioned.
 
Saloon Keeper
Posts: 10981
242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Pat,

I don't have much to offer in advice, but I just wanted to say I hope you enjoy your retirement, and good luck with your project.
 
Pat Farrell
Rancher
Posts: 4686
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Stephan van Hulst wrote: I hope you enjoy your retirement, and good luck with your project.



Thanks. BTW, I don't want folks to get the wrong idea, I did not retire after 20 years of writing Java alone. I retired after more than 40 years as a developer and manager. Only the last 20 dealt with Java. Before that was a long list of languages including Smalltalk, C, C++, Fortran, Cobol and many that I've forgotten.
 
Bartender
Posts: 2407
36
Scala Python Oracle Postgres Database Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scala would tick all your boxes, except for (3): it's a bit slow compiling, but you have the REPL for quick experiments and Scala is so much less verbose than Java that you will probably still be more productive even with extra compile time. And I really like the shift in mindset required for functional programming.

As Jesper says, Akka pretty much solves the concurrency problem and it is also wired into a number of other distributed processing tools like Spark, Kafka. I've just started using Akka Streams for a data pipeline project at work, and I've been really pleased at how it just takes away so much of the pain of multi-threaded programming and asynchronous processing.

On the other hand, Scala still looks a bit like Java, and you're supposed to be having fun, so maybe you'd prefer some other option - you don't want to suffer any Enterprise Java flashbacks, after all. "EJB 1.0, the horror, the horror....".

Anyway, happy retirement!
 
Pat Farrell
Rancher
Posts: 4686
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I looked at Scala a lot, back when I was still working. Bought some books, made some postings in the Scala section here. It looked like it would feel very foreign to me. Since then, the buzz on Scala seems to have quieted down. That it is built to use the JVM is an interesting choice, IMHO, since the JVM has been used and debugged like crazy over the past two decades.

So far, my ordered list of interest goes rust, go, d, scala. Rejects are Ruby, Python, perl and maybe others.
 
Pat Farrell
Rancher
Posts: 4686
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nice overview video of why 'go' is what it is, design philosophy, etc.

https://www.youtube.com/watch?v=uQgWP7zM6mU
 
Stephan van Hulst
Saloon Keeper
Posts: 10981
242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Pat Farrell wrote:BTW, I don't want folks to get the wrong idea, I did not retire after 20 years of writing Java alone. I retired after more than 40 years as a developer and manager. Only the last 20 dealt with Java. Before that was a long list of languages including Smalltalk, C, C++, Fortran, Cobol and many that I've forgotten.



Hah, I wish I had your experience under my belt. I'm wondering if in 30 years people will look at Java like they look at Fortran.
 
Pat Farrell
Rancher
Posts: 4686
7
Mac OS X VI Editor Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:I'm wondering if in 30 years people will look at Java like they look at Fortran.


Fortran is still the language for serious numerical calculations. Of course, today's Fortran doesn't look that much like the Fortran II that I used in 1969, but you can see the ancestry. People write parallel algorithms in modern Fortran with ease that makes a Java guy cry.

I've posted here (years ago) that I think Java is going down the wrong path. They took a very simple language, and added features. Each feature adds complexity. But because they have to protect backwards compatibility, you get some really ugly hacks to the basic language (I'm talking about you generics). This is without even thinking about the complexity of the libraries and frameworks. J2EE and Struts make my head spin. I'm not at all convinced that Hibernate is a net win, as it has nearly all the complexity of writing directly to JDBC, without simplifying things in any meaningful way.

If I were king, I'd freeze Java, and invent Lava or Mava, the next generation. Clean slate design, keeping the best parts with no backward compatibility at all. (I'd probably kill int and byte, etc. and make people use Integer and Byte like a real OO language). Java's @annotation code is a hack because they wanted to add a lot of features that were too complex for mortal programmers, with the idea that your IDE would read some XML config file and automatically generate your Java code. Er, that is the job of a compiler, take easy to read source code and convert it to machine executable data (like byte-code or assembler).

Google is putting impressive effort into 'go' and there are a lot of great videos on YouTube about it. Rust is way behind it on the social media bandwagon. From what I see, "d" has been the next great language for 15+ years, which probably means its never going to get the critical mass to count.

I have to admit that I often smile at some of the postings here on the Ranch. Its a friendly place for rookies, but a lot of rookies seem to think that Java is the one true answer. Learning Java will not guarantee you a job for life. Its not the one true answer, just as we humans have lots of religions, we have lots of programming languages. I've been paid to write in probably 20 to 30 languages. The odds that anyone will be writing code recognizable as Java in 30 years is vanishingly low.... asymptotically approaching zero.

All IMHO, YMMV, etc.
 
Ranch Hand
Posts: 310
18
MS IE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So lucky, Pat! Now you will be able to sit down and code all days for fun Congratulations on your retirement!

I have no suggestions based on your criteria, but I can recommend you something if you would be interested to play with some language for fun.

The first recommendation is Prolog. It's a logic programming language. If you didn't do any logic programming before, now there is an occasion to try some new way of thinking.

The second recommendation is LISP. I remember Richard Stallman glorifying LISP years ago as powerful and elegant, and saying that when "you don't know LISP you don't know really what programming is" or something like that. I never gave it a try, but I would want some day. Maybe it will interest you too as well.

As another alternative, you can play with electronics and programming microcontrollers. I would want to build some home-automatization stuff and control it with µCs, but I have completely no time for this. But you are retired now, and time is no issue for you...

 
Bartender
Posts: 9603
16
Mac OS X Linux Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Pat Farrell wrote: ...hobby in my retirement.



You aren't supposed to learn something new. You're supposed to complain loudly about how things were better way back when (see the nostalga thread for suggestions).
 
Ranch Hand
Posts: 974
11
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When moving away from Java, I would suggest Bali, it is a 5k swim, so it is doable, but watch out for sharks!

(Hey it should be meaningless drivel, right?)
 
Bartender
Posts: 1045
19
Mac OS X IntelliJ IDE Oracle Spring VI Editor Tomcat Server Redhat Java Linux
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

If I were king, I'd freeze Java, and invent Lava or Mava, the next generation.


I agree with everything you say about Java. I'm seeing now its adopted some characteristics of functional programming; some are saying this is good, some bad - I'm meh about it...
Many years back a read a humorous post comparing languages to cars. COBOL was the old school bus; took everyone everywhere but was cumbersome slow and bloated. I think that Java is the new COBOL now. It still exists because it is backed by the large vendors who see it (well JEE) as a standard - fear and loathing. Still like the Spring technologies (template anyone!); cuts down the pain. Boot seems to good too...

(edit) - found one, its a bit too americanised for me, but still; If Programming Languages were Cars..

something new


If I ever retire, the first thing I'll do is have a large camp fire and burn all my computers and books! Second thoughts; I'll sell them and put the money towards another motorbike and go travelling...
Was going to suggest the magical world of "Prolog" , but someone has already suggested one of its derivatives...
 
Bartender
Posts: 10777
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Pat Farrell wrote:If I were king, I'd freeze Java, and invent Lava or Mava, the next generation. Clean slate design, keeping the best parts with no backward compatibility at all. (I'd probably kill int and byte, etc. and make people use Integer and Byte like a real OO language).


Gave you a cow for that, because I totally agree with the first bit. Not the second though, because to me C# got that right - and if the new language could incorporate a struct without getting sued, then that's the path I'd go down.

My suggestion: Why not think up a NEW language, rather than faffing about with old ones, none of which seems to have all the goodies you want.

There are several problems inimical to most languages that haven't been solved yet:
  • Object → Relational mapping.
  • Transactions.
  • Object/Procedural → GUI mapping (browser- or desktop-based).
  • not to mention the whole spaghetti sauce of "web services". And if you came close to solving even ONE of those, I suspect you'd be onto a winner.

    One of the languages I've worked with is Progress, which at least made an attempt at cracking the first (along with being one of the first p-code based, multi-platform languages) - and I can honestly say that it's still the best "database" language I've ever used by a country mile. Unfortunately, it's not (or wasn't) Object-Oriented; but I suspect that it nevertheless contains several keys to solving problem #1 above.

    I have to admit that I often smile at some of the postings here on the Ranch. Its a friendly place for rookies, but a lot of rookies seem to think that Java is the one true answer.


    Right, but we know better, don't we.
    What I would say is that Java is a great "catch-all" language - ie, it does most things adequately - and it's great asset is its flexibility.

    However, I'm definitely ready for Lava, with all the connotations of energy and re-birth - especially in the wake of version 8.

    Winston
     
    Andrew Polansky
    Ranch Hand
    Posts: 310
    18
    MS IE Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    Joe Ess wrote:

    Pat Farrell wrote: ...hobby in my retirement.



    You aren't supposed to learn something new. You're supposed to complain loudly about how things were better way back when (see the nostalga thread for suggestions).



    this!!!
     
    Stephan van Hulst
    Saloon Keeper
    Posts: 10981
    242
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    Winston Gutkowski wrote:

  • Object → Relational mapping.

  • Yes yes yes. This is such a huge pain.

    and it's great asset is its flexibility.


    For me personally, the greatest asset of Java is it's amazing documentation. I've been getting into C#, and while I'm starting to enjoy the language (even though I still prefer many parts of Java), the .NET framework doesn't hold a candle to Java's API documentation.
     
    I miss the old days when I would think up a sinister scheme for world domination and you would show a little emotional support. So just look at this tiny ad:
    Java file APIs (DOC, XLS, PDF, and many more)
    https://products.aspose.com/total/java
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!