Question

Describe racket in terms of readability, writeability, reliability and cost

Describe racket in terms of readability, writeability, reliability and cost
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Q. Describe racket in terms of readability, writeability, reliability and cost

Answer: Racket is a language oriented programming under the Lisp programming group. It is devloped in 1990. Earlier, Racket programming named as PLT(Programming Language Team). Its version start from Version 42, Version 53 (gained good publicity among programmer), Version 100 i.e.Version 1.0, Version 200 introduced with Macro features in its packag, Version 300 supports Unicode, foreign library, classes,etc.,Version 4.0 supports parallisation, in Version 5.0 renamed PLT to Racket programming due to the improvisation in its look. Because earlier was command based and in Version 5.0 introduced with GUI(Graphical User Interface) feature and with time there are number of versions introduced with its new features.The latest version is Racket 7.5 with either Apache 2.0 or MIT license.

1. Readability: Readability depends on way to type with proper indents. The inventor of this programming language gave a readble feature by introducing "[ ]" square bracket to improve code readbility.

Example: (define (foo y z)
(let ([sum (+ y z)]
[diff (abs (- y z))])
(condition [(< y z) sum]
[(> y z) minus]
[else (- sum minus)])))

2. Writeability: Racket programming is a very expressive language.

Example: Instead of writting too much lines of code for printing "Hello PLT programming". It just requires to type as

> "Hello PLT programming"

3. Reliability: Reliability is a feature that may varies with its application area and method to apply. In context of reliability in Racket programming is good but in some places, it lags.

Example: To compare objects, there are 4 comparison procedures:

i. eq?: It compares object by reference. Fast but not reliable in every cases.

(eq? (cons 2 3) (cons 2 3)) --> #f

(let ([y (cons 1 2)]) (eq? y y)) => #u

ii. = : Numerical values are compared.

   (= 4 4.0) --> #t

(= 0.0 -0.0) --> #t

(= 4/10 0.4) --> #f

iii. eqv? is almost same as eq? except one thing that for numbers and characters.

(eq? (expt 4 200) (expt 4 200)) --> #f

(eqv? (expt 4 200) (expt 4 200)) => #t

iv. equal? is also almost same as eqv? except one thing that for decomposable structures and strings.

(eqv? "apple" (string-append "ap" "ple")) --. #f (equal? "apple" (string-append "ap" "ple")) --> #t

Use preferably equal? as it is more reliable & = for exact comparison of numeric values.

4. Cost: Cost is nothing but performance or complexity that evaluates as cost, not like money. Cost term in any programming language is time or performace complexity only. So, do not get confuse from the word Cost. The performance of Racket programming language running time is 20-30 times slower than others.

Add a comment
Know the answer?
Add Answer to:
Describe racket in terms of readability, writeability, reliability and cost
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT