Re: Dylan stuff

mikel evins <[email protected]>
Newsgroups gmane.comp.lang.dylan.gwydion.devel
Message-ID <[email protected]>
On Jan 11, 2013, at 2:41 AM, Bruce Mitchener wrote:

> In modern Dylan, we have "define [adjectives] (class|function|method|generic-function)" ... but the usage in prefix Dylan doesn't support having adjectives.  We use the adjectives for various things: controlling sealing, inlining, abstract vs concrete, primary, thread-local variables, etc.

I don't know why it didn't occur to me before but Bard may actually provide a solution here.

Consider a little example code from the Bard repo:

(define method (fib n)
  with: ((n (exactly 0)))
  1)

(define method (fib n)
  with: ((n (exactly 1)))
  1)

(define method (fib n)
  with: ((n <fixnum>))
  (+ (fib (- n 1))
     (fib (- n 2))))

Notice that, like infix Dylan, Bard's method-definition syntax uses space-separated tokens ("define method"). There's nothing particularly hard about extended that to support adjectives, so that you could write:

(define sealed method (foo bar)
  ...)

_______________________________________________
hackers mailing list
[email protected]
https://lists.opendylan.org/mailman/listinfo/hackers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.