|
![](/i/fill.gif) |
Invisible escreveu:
>>> Um, *yes*. Why, do you think it doesn't have worth?
>>
>> it's far more verbose and, thus, hurts readability?
>
> Far more verbose, and as a consequence it's almost self-explanatory what
> it does. (Unlike a collection of symbols that have no widely-accepted
> meaning outside of regex languages...)
symbols like $ or >>=?
yeah, every language has them and you *learn* to live with them. or you
just endlessly refuse to learn and whine all day long about them...
you are correct though in that the Lisp way of spelling out names is
more self-explanatory than the Haskell abuse of perlisms. At least for
outsiders. For insiders, you know by personal experience that a concise
DSL made out of single chars is much more practical... which is why you
can do it in Lisp with macros too!
>> then try this in your little language:
>>
>> // A phone number with or without hyphens:
>> [2-9]\d{2}-?\d{3}-?\d{4}
>>
>> It looks pretty much like a template for a phone number. I'm sure yours
>> will look like a little backwards forth script and will be much harder
>> to figure out.
>
> I actually can't figure out what that does, so I can't implement it.
BS.
>> I also wonder if it's the postfix nature of regexes that bothers you...
>
> No, mostly it comes down to these:
> 1. Commands have cryptic names like "*" or "+".
more than frakkin' $ or >>= ??!
you quite throw away reason completely when you try to invent reasons
for why you dislike something, don't you?
> 2. Literal characters aren't quoted, so it's hard to tell what's literal
> and what's a command.
there's only .*+?^$\ for commands and the rest are grouping chars ()[]{}
and literal chars. what's to be confused?
> (And 3. since spaces are literal characters, you can't even use spacing
> to make the structure of the expression clearer.)
you can in perl regex extensions.
--
a game sig: http://tinyurl.com/d3rxz9
Post a reply to this message
|
![](/i/fill.gif) |