[racket] raco pkg new (was: Learning Scribble)

From: Eli Barzilay (eli at barzilay.org)
Date: Sat Dec 14 20:06:27 EST 2013

10 hours ago, Jay McCarthy wrote:
> I didn't respond to this thread originally because I believe that
> Racket is generally "anti-stubbing". [...]

10 hours ago, Greg Hendershott wrote:
> 
> I think it's kind of a "language smell" when people need to use
> tools to create projects. I like that Racket doesn't need this. I
> worry adding it would give the wrong idea.

+1 on both...  IMO, a language with macros is a language that requires
much less stub-style templates.  I'm thinking of the huge amount of
code that I used to see with DevStudio when you start a Windows GUI
application from a template.  (That was a long time ago, but I won't
be surprised if it's still doing that.)  On one hand, there's
something nice with getting a bunch of starter code that you need to
follow to get the basics, but OTOH, if you have macros, then more
often the whole template would be folded into some macro[*] and then
the template becomes unnecessary.

Racket takes this further with the everything-is-in-the-language,
which means that even less templating is needed.  For example, even
things that are not regular code, like tests and documentation, is
still just code, which means that the same abstraction tools are used
with them too.

Ruby, and even more so rails, take the opposite approach: there's a
whole lot of stuff done outside of the language, like directories with
known names, etc; and as a result, it's a place where such stubs (and
copy-paste-from-exaples programming) are encouraged to the point that
it's much harder to do any work without them.

([*] It would be interesting to look for examples where such
abstractions are possible with regular languages in a form of some new
library function, yet the language environment chose to still stick
with stub templates.)


9 hours ago, Neil Van Dyke wrote:
> 
> "info.rkt" is the one thing for which ``stubs'' appear appropriate.
> [...]

IMO, following the above intuition, the fact that stubs are useful for
info files is an indication that they could be improved.  Consider, as
a hypothetical example, the specification of a documentation file: if
that specification somehow moves into the documentation in a form of
some code that says "I'm a documentation file, consider me as such for
packaging, and run me to generate the docs", and this will also fall
under the category of things that can be done in the language.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.