Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've always wondered why that was added. It feels to me against the idiom (argot?) of any lisp. It's not composable either.

    (0 . < . x . < . 12)    
    read-syntax: illegal use of `.`    
Typing those extra '.'s gets annoying very quickly too.


My guess is Racket/PLT scheme's history as a language for teaching programming to students.

Racket has some other things that are non-lispy. Support for alternate (maybe non-SEXP) syntax readers and for loops come to mind.

At least it's all simple. Sometimes terrifyingly simple, but simple.

They're useful too. Non-SEXP reader could be used to create a non-infix dialect of Racket. Loop macros like for/or can be used as a more ergonomic way than recursive functions to walk a list to find/transform one of its elements.


It was an experiment - I think the general consensus is that it was a bad idea.

The double dot notation is mostly used for inequalites:

    (x . < . 3)            instead of  (< x 3)
and for function contracts:

    (any . -> . boolean?)  instead of  (-> any boolean?)


MacLisp had an extended dot notation similar to this for hunks:

https://www.maclisp.info/pitmanual/hunks.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: