On Oct 14, 2015, at 5:34 PM, Neil Van Dyke <ne...@neilvandyke.org> wrote:
I very much appreciate diligence about backward-compatibility, but I'm not actually aware of any Racket code that actually uses colon-symbol for any purpose other than as a keyword. And the ones that use colon-symbol as makeshift keywords are few and far between, and only for historical reasons, from before PLT Scheme had keywords. (Or from some obscure super-portable R5RS Scheme SRFI, again because R5RS Scheme didn't have keywords, and they were just improvising keywords by using symbols in the conventional way, i.e., `:keyword`.)
It's not "forking the language", it's turning into an opt-in library. The huge difference between the colon-kw language mixin and that paddle/base language is that the form isn't a language. It can be provided to any language. If your paddle/base language didn't provide colon keywords, you could just as easily get them with #lang colon-kw paddle/base. You're not forking anything, you're simply using a library.
I find the idea of breaking existing code for such a simple stylistic matter that you can fix with nine extra characters at the top of your file somewhat absurd. This isn't fixing some troublesome misfeature, or adding an important new base language feature, or correcting buggy behavior, it's tweaking a completely superficial minor behavior for aesthetic benefit that's quite opinion-driven and not at all a benefit for even a majority of Racket programmers. That's the kind of thing that belongs precisely in an opt-in library, not in a breaking change of the core language.
I can’t wait until all of my programs look like this at the top:
I don't have a very strong opinion, it seems like convenient syntax, but half of what draws me to stick with lisps is the low amount of syntax. Pound-colon has a strong line noise quality to it which colons lack, I admit. But they also have an explicit feel which colons lack.
Inclusion or exclusion of this will not really affect me though. I will probably stick to pound-colon.
Deren
I don't have a very strong opinion, it seems like convenient syntax, but half of what draws me to stick with lisps is the low amount of syntax. Pound-colon has a strong line noise quality to it which colons lack, I admit. But they also have an explicit feel which colons lack.
Regarding Fortran, about 3 weeks ago, I looked into implementing a `#lang fortran77` or `#lang fortran90`.
It would be a substantial project, for either a good practical reason or a hobby.)
We are conducting a highly scientific poll.
The question we want to answer is whether people would like for the Racket standard languages to have symbols that begin with the colon character (except for the symbol `:`) to read the same has keywords that begin with pound-colon.
That is, when this glorious colon-keywords support is added, instead of having to type and look at:
(foo #:abc 1 #:xyx 42)
you can choose to bask in the beauty of:
(foo :abc 1 :xyx 42)
Then you would be free to use the gorgeous colon-keywords everywhere in Racket, including in quick one-line examples in email list posts.
All people of great aesthetic sense, intellect, and good moral fiber, who would naturally like everyone to have the right to use either colon-keywords or (eww) pound-colon keywords (in unity, and without unnecessary `#lang` schisms!), should answer the quick poll:
http://goo.gl/forms/Kwl3uZVMsb
(When the poll question asks "Is it worth changing?", read it is as "You are a good person, and you naturally think Racket should support both colon-keywords and pound-colon keywords, right?")
I call upon all freedom-loving Racketeers to stand up and fight for the righteous cause of colon-keywords. The moment to answer this highly scientific poll is now.
Neil V.
--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> I am genuinely surprised :keyword saw so much support and that change was so attractive to people.That's because of the questions you asked. I saw those questions and said to myself: "Self, I don't care enough about this debate enough to even really fill out these questions." (Although if you had a spot on the pull for the question: "I don't care about this at all, just don't break my code", I would have filled that out.)
On Thu, Oct 22, 2015 at 1:49 PM, Leif Andersen <le...@leifandersen.net> wrote:> I am genuinely surprised :keyword saw so much support and that change was so attractive to people.That's because of the questions you asked. I saw those questions and said to myself: "Self, I don't care enough about this debate enough to even really fill out these questions." (Although if you had a spot on the pull for the question: "I don't care about this at all, just don't break my code", I would have filled that out.)I'm interested in your elaboration. I expected someone with your opinion to vote something like 5/5/0 because you don't care between the two, but don't want a change.
Perhaps it would have been better phrased as "Which do you prefer, #:keyword or :keyword?" with options like "strongly prefer x", "prefer x", "indifferent", "prefer y", "strongly prefer y", rather than two different 1-10 scales.
--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
understand people preferring :foo over #:foo for the reason that it is
faster to type. #: requires two shifted chars. If you touch type you
use both left and right shift keys O_o.
What I want is implicit keyword names for arguments with defaults. So instead of:
(define (foo #:bar? (bar? #f) #:foo (foo 42) #:some-variable-name (some-variable-name 3)) ...)
and (foo #:bar? #t)
we would have:
(define (foo (bar? #f) (foo 42) (some-variable-name 3))
It's the keyworded define and lambda syntax that I find sloppy and ugly.
In my opinion, supplying a default value should make an argument implicitly keywordable. So (define (a b c (d 3) (e 4)) ...) would have 2 required positional arguments, and d and e could be present or omitted. If an argument has a default, it means it should be possible to omit it, and if you cannot specify keywords for the arguments after it (with defaults) then you cannot omit it. That leads to things like this:
(define (foo a b (c #f) (d null) (e null)))
(list a b c d e))
(let ((e '(1 2 3)))
(list
(foo 1 2 #f null e)
(foo 1 2 #f null '(2 3 4))
(foo 1 2 #f e e)
(foo 1 2 #f e)))
Notice how in all cases the "optional" argument c had to be explicitly specified with its own default value. That is confusing because people can't tell if you mean "just ignore this and use the default" or "I really do think it important that c have this value."
So, optional /non-keywordable/ arguments are a bad idea, in my opinion. Being able to do something like this is very important for clarity:
(let ((e '(1 2 3)))
(list
(foo 1 2 :e e)
(foo 1 2 :e '(2 3 4))
(foo 1 2 :d e :e e)
(foo 1 2 :d e)))
I don't have a real preference whether d and e should be allowed to be /positional/ though. It seems reasonable that it might be confusing to go (a 1 2 3 4) where either 3 or 4 are optional arguments with defaults if omitted. A case-lambda would be the best form if you really want (a 1 2) (a 1 2 3) and (a 1 2 3 4). But on the other hand, it doesn't seem too bad, as long as I have the option of specifying those optional arguments as keywords.
But I don't have that option, because I have to say "#:keyword-argument (keyword-argument default)" or it doesn't /let/ me use a keyword to specify that argument's value. That leads to me being forced to boilerplate in defaults for intermediary optional variables. So, that's my big beef with the lambda/define syntax.