Re: mainly syntax
- Posted by David Cuny <dcuny at DSS.CA.GOV> Feb 18, 1998
- 657 views
Irv Mullins wrote: > Is there some reason to write your own lookup routines > instead of using the built-in cos(), sin(), tan() ? Let me give my current "real world" example of zero-based indexing. I'm currently writing a program that reads data from SoundFont files. The SoundFont file format is a RIFF file format developed by E-mu for distributing banks of musical instruments, typically stored as digital samples. Each instrument in the file is identified by an index. Each instrument contains one or more layers. Each layer contains one or more zones. Each zone contains one or more chunks of data: MIDI numbers, sample index, etc. Guess what: each and every one of these data elements are zero-based indexes. Even the MIDI number is zero based. It's difficult enough for my poor little head to keep track of which particular layer I'm in, to say nothing about having to add an offset to the reference. Euphoria doesn't make my job easier. In fact, using Euphoria instead of a language that allows zero-based indexing makes is *more likely* that my code will have bugs in it. I use the same criteria with my complaint of compare(). My basic complaint isn't that I have to type "compare" instead of "="; it's that time and again, I've found bugs that stem back to forgetting to include "= 0" after a compare() statement. I want a language that makes it more probable that I'll succeed at my task. For the most part, Euphoria does that well. -- David Cuny