Sorry for the private email instead of public, I always seem to miss the
reply-all button. I did get it to work, but it felt off. If it were to
actually be added to typed racket, it might be better to have some sort of
standalone form like (define-type-arg-convention number Number) which lets
all y
We exchange email off-line and Jack figured out what he wanted. It might be
neat to add it to TR.
On Oct 7, 2014, at 9:24 PM, Alexander D. Knauth wrote:
>
> On Oct 7, 2014, at 2:38 PM, Jack Firth wrote:
>
>> I read a tweet about someone wistfully wishing there was some sort of "the"
>
On Oct 7, 2014, at 2:38 PM, Jack Firth wrote:
> I read a tweet about someone wistfully wishing there was some sort of "the"
> operator in a typed non-parensy language such that one could write something
> like this:
>
> Customer someFunc(the customer) { ... }
>
> and have it mean:
>
>
On Tue, Oct 07, 2014 at 11:38:43AM -0700, Jack Firth wrote:
> I read a tweet about someone wistfully wishing there was some sort of "the"
> operator in a typed non-parensy language such that one could write
> something like this:
>
> Customer someFunc(the customer) { ... }
>
> and have it mea
Will this help:
#lang typed/racket
(define-syntax (the stx)
(syntax-case stx ()
[(_ (define (f x) e))
(let ((capital-x (capitalize stx #'x)))
#`(begin
(: f (-> #,capital-x #,capital-x))
(define (f x)
e)))]))
(define-for-syntax (capitalize stx x)
I read a tweet about someone wistfully wishing there was some sort of "the"
operator in a typed non-parensy language such that one could write
something like this:
Customer someFunc(the customer) { ... }
and have it mean:
Customer someFunc(Customer customer) { ... }
Basically, an operat
6 matches
Mail list logo