Racket vs Ruby

Need advice about which tool to choose?Ask the StackShare community!

Racket

87
80
+ 1
49
Ruby

41.1K
21.2K
+ 1
4K
Add tool

Racket vs Ruby: What are the differences?

  1. Syntax: Racket uses prefix notation which means the operator comes before the operands, while Ruby uses infix notation where the operator is placed between the operands. This difference in syntax can affect the readability and writing style of the code.
  2. Type System: Racket is a statically typed language, meaning variables are assigned data types at compile time and checked for type errors before execution. In contrast, Ruby is a dynamically typed language where variables are assigned data types at runtime, allowing for more flexibility but potentially leading to more runtime errors.
  3. Metaprogramming: Ruby has a strong focus on metaprogramming, allowing developers to write code that can modify itself or create new code at runtime. Racket, on the other hand, does not have as robust metaprogramming capabilities.
  4. Community and Ecosystem: Ruby has a larger and more active community compared to Racket, with a vast array of libraries and frameworks available for various tasks. Racket, while growing, has a smaller community and ecosystem.
  5. Concurrency: Racket provides built-in support for lightweight green threads, allowing for easy concurrency and parallelism. Ruby, on the other hand, relies on external libraries or tools for handling concurrency effectively.
  6. Purpose: Racket is primarily designed for academic and research purposes, with a focus on functional programming and language design. Ruby, on the other hand, is more suited for web development and is widely used in the industry for building web applications.

In Summary, Racket and Ruby differ in syntax, type system, metaprogramming capabilities, community size, concurrency support, and target purposes.

Decisions about Racket and Ruby
Andrew Carpenter
Chief Software Architect at Xelex Digital, LLC · | 16 upvotes · 402.4K views

In 2015 as Xelex Digital was paving a new technology path, moving from ASP.NET web services and web applications, we knew that we wanted to move to a more modular decoupled base of applications centered around REST APIs.

To that end we spent several months studying API design patterns and decided to use our own adaptation of CRUD, specifically a SCRUD pattern that elevates query params to a more central role via the Search action.

Once we nailed down the API design pattern it was time to decide what language(s) our new APIs would be built upon. Our team has always been driven by the right tool for the job rather than what we know best. That said, in balancing practicality we chose to focus on 3 options that our team had deep experience with and knew the pros and cons of.

For us it came down to C#, JavaScript, and Ruby. At the time we owned our infrastructure, racks in cages, that were all loaded with Windows. We were also at a point that we were using that infrastructure to it's fullest and could not afford additional servers running Linux. That's a long way of saying we decided against Ruby as it doesn't play nice on Windows.

That left us with two options. We went a very unconventional route for deciding between the two. We built MVP APIs on both. The interfaces were identical and interchangeable. What we found was easily quantifiable differences.

We were able to iterate on our Node based APIs much more rapidly than we were our C# APIs. For us this was owed to the community coupled with the extremely dynamic nature of JS. There were tradeoffs we considered, latency was (acceptably) higher on requests to our Node APIs. No strong types to protect us from ourselves, but we've rarely found that to be an issue.

As such we decided to commit resources to our Node APIs and push it out as the core brain of our new system. We haven't looked back since. It has consistently met our needs, scaling with us, getting better with time as continually pour into and expand our capabilities.

See more
Thomas Miller
Talent Co-Ordinator at Tessian · | 16 upvotes · 229.1K views

In December we successfully flipped around half a billion monthly API requests from our Ruby on Rails application to some new Python 3 applications. Our Head of Engineering has written a great article as to why we decided to transition from Ruby on Rails to Python 3! Read more about it in the link below.

See more
Mike Fiedler
Enterprise Architect at Warby Parker · | 3 upvotes · 220.4K views

When I was evaluating languages to write this app in, I considered either Python or JavaScript at the time. I find Ruby very pleasant to read and write, and the Ruby community has built out a wide variety of test tools and approaches, helping e deliver better software faster. Along with Rails, and the Ruby-first Heroku support, this was an easy decision.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Racket
Pros of Ruby
  • 3
    Meta-programming
  • 3
    Hygienic macros
  • 2
    Pattern matching
  • 2
    Module system
  • 2
    Beginner friendly
  • 2
    Fast
  • 2
    Gradual typing
  • 2
    Nanopass compiler
  • 2
    Extensible
  • 2
    Racket Macro system
  • 2
    Cross platform GUI
  • 2
    Macro Stepper
  • 2
    Built-in concurrency
  • 2
    Built-in parallelism
  • 2
    Functional Programming
  • 2
    Open source
  • 2
    Language-oriented programming
  • 2
    FFI
  • 2
    Great libraries
  • 2
    Beautiful code
  • 2
    Rapid development
  • 1
    Racketscript
  • 1
    Great community
  • 1
    Typed Racket
  • 1
    IDE
  • 1
    Good documentation
  • 605
    Programme friendly
  • 536
    Quick to develop
  • 490
    Great community
  • 468
    Productivity
  • 432
    Simplicity
  • 273
    Open source
  • 234
    Meta-programming
  • 207
    Powerful
  • 156
    Blocks
  • 139
    Powerful one-liners
  • 69
    Flexible
  • 58
    Easy to learn
  • 51
    Easy to start
  • 42
    Maintainability
  • 37
    Lambdas
  • 30
    Procs
  • 21
    Fun to write
  • 19
    Diverse web frameworks
  • 13
    Reads like English
  • 10
    Makes me smarter and happier
  • 9
    Rails
  • 8
    Very Dynamic
  • 8
    Elegant syntax
  • 6
    Matz
  • 5
    Object Oriented
  • 5
    Programmer happiness
  • 4
    Elegant code
  • 4
    Generally fun but makes you wanna cry sometimes
  • 4
    Friendly
  • 4
    Fun and useful
  • 3
    Easy packaging and modules
  • 3
    There are so many ways to make it do what you want
  • 2
    Primitive types can be tampered with

Sign up to add or upvote prosMake informed product decisions

Cons of Racket
Cons of Ruby
  • 2
    LISP BASED
  • 2
    No GitHub
  • 7
    Memory hog
  • 7
    Really slow if you're not really careful
  • 3
    Nested Blocks can make code unreadable
  • 2
    Encouraging imperative programming
  • 1
    Ambiguous Syntax, such as function parentheses

Sign up to add or upvote consMake informed product decisions

- No public GitHub repository available -

What is Racket?

It is a general-purpose, multi-paradigm programming language based on the Scheme dialect of Lisp. It is designed to be a platform for programming language design and implementation. It is also used for scripting, computer science education, and research.

What is Ruby?

Ruby is a language of careful balance. Its creator, Yukihiro “Matz” Matsumoto, blended parts of his favorite languages (Perl, Smalltalk, Eiffel, Ada, and Lisp) to form a new language that balanced functional programming with imperative programming.

Need advice about which tool to choose?Ask the StackShare community!

What companies use Racket?
What companies use Ruby?
See which teams inside your own company are using Racket or Ruby.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with Racket?
What tools integrate with Ruby?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

Nov 20 2019 at 3:38AM

OneSignal

PostgreSQLRedisRuby+8
9
4640
Oct 24 2019 at 7:43PM

AppSignal

JavaScriptNode.jsJava+8
5
954
Jun 6 2019 at 5:11PM

AppSignal

RedisRubyKafka+9
15
1640
GitHubDockerReact+17
40
36264
What are some alternatives to Racket and Ruby?
Haskell
It is a general purpose language that can be used in any domain and use case, it is ideally suited for proprietary business logic and data analysis, fast prototyping and enhancing existing software environments with correct code, performance and scalability.
Common Lisp
Lisp was originally created as a practical mathematical notation for computer programs, influenced by the notation of Alonzo Church's lambda calculus. It quickly became the favored programming language for artificial intelligence (AI) research. As one of the earliest programming languages, Lisp pioneered many ideas in computer science, including tree data structures, automatic storage management, dynamic typing, conditionals, higher-order functions, recursion, and the self-hosting compiler. [source: wikipedia]
Clojure
Clojure is designed to be a general-purpose language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming. Clojure is a compiled language - it compiles directly to JVM bytecode, yet remains completely dynamic. Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy and a powerful macro system.
Python
Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
OCaml
It is an industrial strength programming language supporting functional, imperative and object-oriented styles. It is the technology of choice in companies where a single mistake can cost millions and speed matters,
See all alternatives