|
problem with is
Jakub T. Jankiewicz
(03 Apr 2026 09:56 UTC)
|
|
Re: problem with is
Maciek Godek
(03 Apr 2026 11:23 UTC)
|
|
Re: problem with is
Jakub T. Jankiewicz
(03 Apr 2026 13:13 UTC)
|
|
Re: problem with is
Andrew Tropin
(03 Apr 2026 14:53 UTC)
|
|
Re: problem with is
Andrew Tropin
(03 Apr 2026 14:51 UTC)
|
|
Re: problem with is
Andrew Tropin
(03 Apr 2026 14:40 UTC)
|
|
Re: problem with is
Jakub T. Jankiewicz
(03 Apr 2026 18:20 UTC)
|
|
Re: problem with is
John Cowan
(03 Apr 2026 23:29 UTC)
|
|
Re: problem with is
Andrew Tropin
(04 Apr 2026 04:41 UTC)
|
|
Re: problem with is Andrew Tropin (04 Apr 2026 04:12 UTC)
|
On 2026-04-03 20:20, Jakub T. Jankiewicz wrote: > On Fri, 03 Apr 2026 21:39:28 +0700 > Andrew Tropin <xxxxxx@trop.in> wrote: > >> On 2026-04-03 11:56, Jakub T. Jankiewicz wrote: >> >> > The name `is`, in its current form, is problematic. It doesn't make sense >> > semantically. `is` should compare two values not compare if something is >> > truthy. >> > >> > In normal sentence you have: >> > >> > x is y >> > >> > so the prefix notation should be: >> > >> > (is x y) >> > >> >> Hi Jakub! >> >> Your idea is very reasonable. Especially for the case with two >> arguments. For one argument `is` can be read differently. >> >> (define your-idea "`is` should compare two values") >> (is (very-reasonable? your-idea)) >> (is (string=? your-idea "`is` should assert truthness")) >> >> Try instead of `x is y` pattern use `it is so that ...`. >> >> it is so that your-idea conforms very-reasonable? predicate. >> >> is it so? > > but in your "is" the "what" is missing, you can't understand the code by just > reading it, you will need to read the documentation? Every symbol in R7RS have > the reason for the check (symbol? string?). `is` in your case is like using > question mark without a proper noun. > (is (= 4 (+ 2 2))) ; "is 4 equal to 2+2?" (is (even? 14)) ; "is 14 even?" (is (string=? "hello" x)) ; "is "hello" string equal to x?" Isn't it understandable by just reading the code? I may be baised and too used to it because of Clojure background and don't see some obvious flaw. So the question above is genuene, let me know if it doesn't reads as I noted in comments. >> >> There are a few thoughts on the topic: >> 1. I'm not a native english speaker, but for me such reading make sense. >> So, probably is asserting thruthness of its argument can be a valid >> option. I may be wrong, but would be glad to hear input >> >> 2. It's much shorter. The test looks cleaner and easier to read. >> Subjective, of course. >> >> 3. assert is an overloaded term and `assert` is very likely provided in >> many implementations and in r6rs. `is` is free from assert's "baggage". > > `is` is short and not taken, ok. But it doesn't make sense with one > argument. Do you mean non-predicative form like (is x)? if so, the potential solution could be to forbid non-predicative forms and use (is (true? x)) instead. > Is is exactly like `=` that also doesn't make sense with one argument, it > checks nothing. > > Consider different name if you must use one argument like `valid?` or > `true?`. Since this is what you're checking. -- Best regards, Andrew Tropin