Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #9257
| From | Tassilo Horn <tassilo@member.fsf.org> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: How to check if the n-th part of an array of Strings exist? |
| Date | 2011-10-27 21:31 +0200 |
| Organization | University Koblenz-Landau Campus Koblenz |
| Message-ID | <87hb2uut8a.fsf@thinkpad.tsdh.de> (permalink) |
| References | (2 earlier) <qot62jahpek.fsf@ruuvi.it.helsinki.fi> <j8bf5f$b8i$1@dont-email.me> <htlia7donph3mi48evn2l5qi2ini8rbn7a@4ax.com> <4ea95fbd$0$631$426a74cc@news.free.fr> <p85ja7hgsghec32c7ahkg2p6tss06n88lj@4ax.com> |
Gene Wirchenko <genew@ocis.net> writes: >>I'd wager that refusing to compile is more useful than meaning >>something useless and confusing, therefore errors-prone. > > It is neither useless nor confusing. That notation is used in > math. For example: > Let x, y, and z be integers with x < y < z. > I think it clearer than > Let x, y, and z be integers with x < y and y < z. > The verbosity does not gain anything. > > ISTR a programming language that did allow this construct. I > would like to see it more commonly used. Nearly all Lisps support that. ,----[ Clojure ] | user> (doc <) | ------------------------- | clojure.core/< | ([x] [x y] [x y & more]) | Returns non-nil if nums are in monotonically increasing order, | otherwise false. | nil | user> (< 1 2.4 30 111 9e10) | true | user> (< 0) | true ;; Of course, all nums are in monotonically increasing order `---- ,----[ Common Lisp ] | * (describe #'<) | | #<FUNCTION <> | [compiled function] | | Lambda-list: (NUMBER &REST MORE-NUMBERS) | Derived type: (FUNCTION (T &REST T) (VALUES (MEMBER NIL T) &OPTIONAL)) | Documentation: | Return T if its arguments are in strictly increasing order, NIL otherwise. | Source file: SYS:SRC;CODE;NUMBERS.LISP | * (< 1 10 16 99 189) | | T | * (< 1) | | T ;; Of course, all arguments are strictly in intreasing order `---- ,----[ Scheme ] | #;> (< -1 0 19 93 321 1000) | #t | #;> (< 1) | Error in <: incorrect number of arguments to procedure `---- Bye, Tassilo
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
How to check if the n-th part of an array of Strings exist? jochen2@brenz.com (Jochen Brenzlinger) - 2011-10-25 16:26 +0000
Re: How to check if the n-th part of an array of Strings exist? Tom McGlynn <taqmcg@gmail.com> - 2011-10-25 09:41 -0700
Re: How to check if the n-th part of an array of Strings exist? Wojtek <nowhere@a.com> - 2011-10-26 23:37 -0700
Re: How to check if the n-th part of an array of Strings exist? Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2011-10-27 10:20 +0300
Re: How to check if the n-th part of an array of Strings exist? Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-10-27 07:26 -0400
Re: How to check if the n-th part of an array of Strings exist? Tim Slattery <Slattery_T@bls.gov> - 2011-10-27 09:09 -0400
Re: How to check if the n-th part of an array of Strings exist? Mayeul <mayeul.marguet@free.fr> - 2011-10-27 15:45 +0200
Re: How to check if the n-th part of an array of Strings exist? Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2011-10-27 16:55 +0300
Re: How to check if the n-th part of an array of Strings exist? Gene Wirchenko <genew@ocis.net> - 2011-10-27 10:37 -0700
Re: How to check if the n-th part of an array of Strings exist? Tassilo Horn <tassilo@member.fsf.org> - 2011-10-27 21:31 +0200
Re: How to check if the n-th part of an array of Strings exist? Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-10-27 21:25 -0400
Re: How to check if the n-th part of an array of Strings exist? Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2011-10-28 10:08 +0300
Re: How to check if the n-th part of an array of Strings exist? Roedy Green <see_website@mindprod.com.invalid> - 2011-10-28 06:20 -0700
Re: How to check if the n-th part of an array of Strings exist? Arne Vajhøj <arne@vajhoej.dk> - 2011-11-06 14:54 -0500
csiph-web