Re: [stack] sweetening concatenative syntax

"Daniel Ehrenberg" <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
>  Anyway, saying that "all your doing is pattern matching" gets more
>  complicated when types are involved. For example, when I eventually
>  introduce GADTs, sum deconstructors like 'unlist' will need to
>  introduce equality constraints. It also isn't clear how a macro could
>  be able to inform you if you've not covered all of the possible cases
>  when matching. Therefore, any sort of general pattern matching
>  facility would need to be implemented into the language proper, and
>  ideally I'd like to avoid that as it complicates things.
>
>  - John

Pattern matching only has to be built into a language when its type
system or syntax extension system is insufficiently expressive.
There's no good reason why a complicated, library-based pattern
matching macro couldn't cooperate with a type system or completeness
constraints. Factor has two pattern matching libraries implemented,
which take different tactics but are both fairly general and
implemented without the help of the core.

If Fifth ultimately gets a good enough macro system, you won't need to
worry about all of those syntax extensions that started this
discussion until writing your standard library. Even if a macro system
is a big step and a big thing to think about, it can make your
language much simpler overall.

Dan
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.