POV-Ray : Newsgroups : povray.off-topic : Mini-languages : Re: Mini-languages Server Time
4 Sep 2024 03:22:55 EDT (-0400)
  Re: Mini-languages  
From: Invisible
Date: 11 Nov 2010 10:31:36
Message: <4cdc0c58$1@news.povray.org>
>> 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...)

> come on! do you even need those quotes around the symbols?

Yes. Because this is a real programming language, you could replace the 
character name with a variable, for example. In this way you can make 
the pattern parameterised.

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

> 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 "+".
2. Literal characters aren't quoted, so it's hard to tell what's literal 
and what's a command.
(And 3. since spaces are literal characters, you can't even use spacing 
to make the structure of the expression clearer.)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.