Re: subscripts (Long Post)
- Posted by Robert Craig <rds at ATTCANADA.NET> May 16, 2000
- 463 views
Lewis Townsend writes: > Rob Craig writes: >> Your idea could also be quite useful, >> but I want to keep things simple. > a = sequence_of_unknown_length_or_structure > sb = sequence_to_subscript_one_value_from_a > return a [sb] > -- note that this would work for 8+ levels with no more code > This seems simpler to me, ... It's very easy to come up with language features that make particular, specialized situations very "simple" for the programmer. i.e. he can code a particular thing with far fewer statements. That's not what I meant by "simple". I meant, I want to keep the language definition simple. Anyway, there are at least two other ways of defining subscripting of a sequence with a sequence that I think might be useful to more people in more instances. I described one of them last time, another would go something like: s = {100, 200, 300, 400, 500} ? s[{5, 1, 3, 3}] {500, 100, 300, 300} I'm still not impressed enough to move ahead with any of these 3 approaches. I'd rather have a language that's based on a small number of simple, powerful features, that everyone understands, than a language with a thick, dense, manual describing hundreds of slick, but unnecessary features for dealing with specialized situations. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com