Go back to previous page
Forum URL: http://www.eyrie-productions.com/Forum/dcboard.cgi
Forum Name: General
Topic ID: 1361
Message ID: 17
#17, RE: Text Transformation Language
Posted by Proginoskes on Jun-26-15 at 04:22 PM
In response to message #13
I find myself using the recursive version much more often, but since
it's the one that could result in an error, I like the idea of making
"recursive" the one that you have to specify. I'll definitely
implement that.

As for a selector for the default... I'll toy with that idea. I'm not
against it, but I need to think on it.


The main reason I went back on suggesting that a "recursive" word be required is that changing the default behaviour will break existing scripts. If you implement a default selector, that makes fixing those scripts a matter of adding a single line at the beginning, rather than changing some large fraction of the lines throughout.
>As a follow-up to the edit above, case-sensitivity
directives and modifying words. BY DEFAULT
OBSERVE CASE
, REPLACE "find" WITH "add"
IGNORING CASE
, and so on.

This one scares me for the amount of logic I'd need to put in place.
I'd need to either look for every possible mixed case version of the
"FIND" command or build a separate variable for the input text that's
all U- or LCased, and then replicate all the commands on both versions
of input text to keep all the characters in the same place... and then
do I always replace whatever's found with the case that's in the "Add"
sub-string in the script, or do I try to re-create the destination
casing?


My impression is that generally, case sensitivity only affects the "search" part of "search and replace". But yeah, "where does it end?!" is a valid concern here.

Regarding BASIC:

My dislike of BASIC is, as I mentioned, not completely rational; as Zwol said, modern BASICs are probably as a general rule better to use than Standard C or C++. Modern BASICs no longer force you to write spaghetti code, advancements in compiler state-of-the-art have largely obsoleted hand-tuning critical code, and so on. The only thing that I really have to justify my continued dislike is the ambiguous/context-sensitive constructs. (The code fragment aleph = beth can mean two different things, depending on the surrounding code, and to me, being used to C/Java/PHP syntax, that's just not right.)

All that said, I actually looked into installing FreeBASIC so I could poke at the code, when I discovered a rather bigger problem: both computers I use are Darwin machines, and it's impossible to get a Darwin FreeBASIC compiler. I suppose the thing to do would be to use WINE to run the Windows compiler, but it's a little frustrating.