Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Scheme Output/String Formatting Best Practices

Name: Anonymous 2014-08-28 5:46

What is your preference? Are there other alternatives possible by composing R7RS base library procedures and macros?

; R7RS compliant version
(import (scheme write))
(define world "World)
(for-each display `("Hello, " ,world "!\n")

; R7RS with SRFI 28/29/48 for formatted string templates
(import (scheme write)
(srfi 28))
(define world "World)
(display (format "Hello, ~a!\n" world))

Name: Anonymous 2014-08-29 21:49

Get this through those thick skulls of yours: THERE ARE NO BEST PRACTICES!!! There are only unsuitable ones, good ones, and better ones for the particular situation at hand, and being able to consider the tradeoffs between all possible solutions is the skill that any engineering is about. Attempting to distill the decisionmaking process of a whole discipline into a set of "best practices" to be followed religiously and brainlessly like trained monkeys is pure idiocy.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List