_-exp: Configurable Scribble-like Syntax
#lang _-exp | package: _-exp |
The _-exp language is a metalanguage similar to #lang at-exp, in that it adds support for the @-reader to some base language.
However, rather than using @ as the command character, _-exp alows the programmer to specify one on a per-module basis. The default command character ƒ, i.e. the result of (integer->char 402). This is especially convienient when working with text in which the character @ appears frequently.
#lang _-exp racket/base (define (goodnight who) ƒdisplayln[ƒstring-append{Goodnight, my ƒ|who|.}]) (goodnight "someone") ƒgoodnight{love}
Goodnight, my someone.
Goodnight, my love.
#lang _-exp #:@ racket/base (define (goodnight who) @displayln[@string-append{Goodnight, my @|who|.}]) (goodnight "someone") @goodnight{love}
Changed in version 0.1 of package _-exp: Fixed an implementation flaw that caused _-exp to incorrectly interpret language-path as a module path, which is inconsistent with at-exp and somewhat defeats the purpose of a meta-language. Unfortunately this is a breaking change: while common cases like #lang _-exp racket continue to work properly, the previous implementation accepted e.g. #lang _-exp web-server/lang, which will now correctly cause an error. (What you should write is #lang _-exp web-server, but that didn’t work with the previous version.)