pull down to refresh
3 sats \ 2 replies \ @nerd2ninja 5 Aug 2022 \ parent \ on: What do you think about Googles new programming language Carbon? bitcoin
I definitely have a "first love" bias. As in the first language I learned can do no wrong and everything else just looks terrible (though ruby and python are so similar that I can easily switch to that)
You know just compare these two examples:
Java
https://www.javatpoint.com/java-program-to-count-the-total-number-of-vowels-and-consonants-in-a-string
Ruby (this ruby code is not good, but you can tell it was made for people who are new and just trying to learn)
https://medium.com/@PolinaHackTech/count-vowels-in-a-string-in-ruby-app-academy-prep-work-20700832d2f5
Java:
Ruby
But you know, maybe the more honest answer is that I don't know java and I do know ruby.
No no, I get that. Programming Java is always a whole thing instead of just a small script. That makes it ugly. I get that.
reply
This example says nothing about the language but the programmers. The java code is not as elegantly written as the ruby code.
Indeed, putting everything in the main method instead of creating two separate ones is lazy and amateurish, and would not pass a serious code review.
reply