What are the pros and cons of Scheme? Is it machine-independent?
Here are two very straightforward questions:
- Is Scheme machin开发者_运维技巧e-independent?
- What are the advantages and disadvantages of Scheme?
Scheme is a language, not a program. That's like asking if English is country-independent. If you mean whether or not you can run Scheme code on multiple platforms, the answer is that it depends on what interpreter/compiler you use.
This is a really broad question but I'll give it a shot:
- Advantages: Simple syntax, easy to learn, functional programming
- Disadvantages: Can't do low-level operations
In general yes, Scheme programs can be run on different platforms. It is more machine independet than C. There are many cross-platform scheme implementations, namely Racket (formerly plt-scheme), chicken, gambit-c, guile. Bigloo scheme can compile to JVM, which is obviously machine independent
Advantages are (for me) is expressness power and speed of development. Disadvantages are run-time type checking (Racket support compile-time), weak standard r5rs as it does not include modules, utf8, networking and so on and programmer usually have to stay with chosen scheme implementation [forever].
精彩评论