Ruby, Python, Java, C and Programmer Happiness
Join the DZone community and get the full member experience.Join For Free
“ruby is designed to make programmers happy.” - yukihiro “matz” matsumoto
not everyone might agree, but as a rubyist i think matz achieved his design goal. there’s something intangible about ruby’s syntax that makes it fun, rewarding and easy to use – something that makes me happy. i thought it would be fun to compare ruby with a few other languages by looking at how different open source developers implemented the same method or function in each language. how do the languages differ? do they make you equally happy?
and what better example to look at than inside of ruby itself! today i’m going to look at how ruby’s hash#fetch method is implemented in ruby (by rubinius), python (by topaz), java (by jruby) and finally in c (by standard ruby 2.0). of course, there are many other programming languages out there, even other versions of ruby, but looking at a small slice of ruby internals gives us an interesting example and allows us to compare apples with apples.
read the full article on rubysource.com .
Published at DZone with permission of Pat Shaughnessy, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Low Code vs. Traditional Development: A Comprehensive Comparison
Implementing RBAC in Quarkus
JSON to PDF Magic: Harnessing LaTeX and JSON for Effortless Customization and Dynamic PDF Generation
Kafka: The Basics