I don't want to be a spoilsport, but I'm slowly beginning to think that
Factor's syntax is growing too much and specialising a lot.
It might aid quick typing, but it is too much to remember when reading
someone else's code. Every time I'm looking through the standard library
I find new syntaxes and it leaves me pretty disappointed that I can't really
do *much* without knowing quite a lot of it.

Do we really want another Perl?

Note: I'm new to factor, and my comments probably mean nothing.

Nikhil

On Fri, Jul 4, 2008 at 7:30 AM, Joe Groff <[EMAIL PROTECTED]> wrote:

> { [ ] [ ] } is starting to become a common pattern, with the cleave,
> spread, short-circuit, and other high-level combinators taking
> sequences of quotations as arguments. I think it'd be nice to have a
> shorthand notation for this common pattern. My idea is to use [[ ]] as
> brackets around a quotation sequence, with ;; as a separator (inspired
> by { } and ; in Haskell's do syntax). So this:
>
> --8<--
> [[ drop [ cols>> ] [ rows>> ] bi* =
> ;; nip [ rows>> ] bi@ =
> ;; nipd [ cols>> ] bi@ =
> ]] 3&&
> --8<--
>
> would be equivalent to:
>
> --8<--
> {
>     [ drop [ cols>> ] [ rows>> ] bi* = ]
>     [ nip  [ rows>> ] bi@ = ]
>     [ nipd [ cols>> ] bi@ = ]
> } 3&&
> --8<--
>
> One could even go out on a limb and extend this pattern to arrays of
> arrays or hash tables:
>
> --8<--
> {{ 1 [ "One! a-ha-ha!" ]
> ;; 2 [ "Two! a-ha-ha!" ]
> }} case
>
> H{{ "US$" 1.0 ;; "EU€" 1.6 ;; "CA$" 1.1 }}
> --8<--
>
> I'll implement these words in a separate vocab, but I want to make
> sure this idea isn't totally insane before I go using it in any code.
>
> -Joe
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>



-- 
Diogenes  - "What I like to drink most is wine that belongs to others."
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to