You’ve certainly heard of JavaScript, Perl, Python, and Ruby. But Racket? Probably not. Just because it’s not the most mainstream programming language doesn’t mean you should discount its capabilities. Racket allows functional programming and other different paradigms that even hard-core programmers have never seen before.
What is Racket-lang:
Racket is a descendant of Lisp, a programming language renowned for its elegance, power, and challenging learning curve. But while Racket retains the functional goodness of Lisp, it was designed with beginning programmers in mind. It goes beyond Lisp and Scheme with dialects that support objects, types, laziness, and more. Racket enables programmers to link components written in different dialects, and it empowers programmers to create new,project-specific dialects. Racket’s libraries support applications from web servers and databases to GUIs and charts.
A glimpse of Racket-lang:
Getting started with Racket-lang is pretty easy unlike lisp which requires a substantial amount of knowledge before even you write your first hello world program. Below is a small example to get you started with Racket-lang –
|
;;;hello world in Racket
#lang racket
"Hello, World!"
|
|
;;;This program, taken from the Racket website, draws a Sierpinski triangle, nested to depth 8.
#lang racket
(require 2htdp/image)
(let sierpinski ([n 8])
(if (zero? n)
(triangle 2 'solid 'red)
(let ([t (sierpinski (- n 1))])
(freeze (above t (beside t t))))))
|

IDE for Racket-lang:
Racket-lang has a plethora of tools and among those DrRacket is a Racket’s graphical environment for developing programs. You can get it from
here.Other useful tools are –
- Futures Visualizer
- Optimization Coach
- PLaneT: Automatic Package Distribution
- Racklog: Prolog-Style Logic Programming
- RackUnit: Unit Testing
- Redex: Practical Semantics Engineering
- Scribble as Preprocessor
- Slideshow: Figure and Presentation Tools
Learning Racket is easy and the community is very active so you get your doubts clear easily. Also, the documentation of Racket is vast and complete and help you understand every bit of language.
Did you like this piece on the programmable programming language Racket? Tell us in comments below.
Post a Comment
Click to see the code!
To insert emoticon you must added at least one space before the code.