Re: mainly syntax
- Posted by Pete Eberlein <xseal at HARBORSIDE.COM> Feb 17, 1998
- 761 views
Hello everyone, [FOOBAR] Well, I can't be sure where or when this originated, but I know it started out with the acronym FUBAR. This stands for "fouled up beyond all recognition" (or f**ked up, depending on your level of vulgarity). It was quickly applied to computer programming, and in the quest for creative variable naming conventions, "foo" and "bar" started showing up for arbitrary variable names and programming examples. Yeah. [END OF SLICE] It would be nice not to have to retype the name of a sequence just to get a slice up to the end. mysequence = mysequence[2..length(mysequence)] [APPEND] Same type of problem here. mysequence = append(mysequence, newthing) gets a little tedious. I like the suggestion for mysequence.append(newthing) because it's closer to OOP and connecting methods to data. [The tyranny of compare?] What's wrong with compare? Compare is neccessary because using =,<,> on a sequence compares each element of a sequence individually with each element in another sequence. This works great for a replacement algorithm in this line of code: s = s + ('X'-'x')*(s = 'x') -- this makes all occurrences of 'x' into 'X' [OOP] I would like to use the discipline of OOP with Euphoria. It could be possible with a preprocessor, I think. Virtual procedures and functions would be fairly easy to implement now that we have routine_id and call_proc. Later, -- _____ _____ _____ ________ /\ \ /\ \ /\ \ / \ \ / \____\ / \____\ / \____\ / _ \____\ / / ___/_ / /____/ / / ___/_ / / \ |____|/ / /\____\ / \ \ / / /\____\ \ \_/ / / \ \/ / ___/_\ \ \ \ \/ / ___/_ \ /____/ \ / /\ \\/\ \ \ \ / /\ \ \ \ \ \ \/ \____\ \ \ \ \ \/ \____\ \ \ \ \ / / \ \____\ \ / / \ \____\ \ / / \ / / \ / / \ / / \ / / \/____/ \ / / \/____/ \/____/xseal at harborside.com\/____/