February 21, 2014 Re: Ada conference, Ada and Spark | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thiez | Am 21.02.2014 16:57, schrieb Thiez:
> On Friday, 21 February 2014 at 14:27:48 UTC, Paulo Pinto wrote:
>> On Friday, 21 February 2014 at 13:08:37 UTC, Francesco Cattoglio wrote:
>>> On Friday, 21 February 2014 at 12:56:32 UTC, Paulo Pinto wrote:
>>>> That is easy to answer, I doubt they could with their rule of not
>>>> having more than 5 characters per keyword. :)
>>> Wait, what? REALLY????? What kind of rule is that.
>>> ahahahha... are they stuck to the 70's? :D
>>
>> Yes really,
>> http://forum.dlang.org/post/glnafbocwjodiwrqwmbv@forum.dlang.org
>>
>> I just cannot find the Reddit thread any longer.
>
> That is not true, Rust has several keywords that are more than 5
> characters, such as 'continue'. The full list is here:
> http://static.rust-lang.org/doc/master/rust.html#keywords . It is true
> that they prefer short keywords over long ones. It used to be the case
> that 'loop' could mean 'continue' but people found it confusing so it
> was fixed.
What I was arguing in that old thread was things like pub vs public, mut vs mutable and so on.
I have a strong ML background as my university teachers were quite found of ML and we had a few courses using Caml Light.
So I do like Rust and my issue back then was why to short those keywords and similar.
Then again as I come from Pascal family of languages and always liked a bit verbosity, instead of the write only way of C.
--
Paulo
|
February 21, 2014 Re: Ada conference, Ada and Spark | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thiez | On Friday, 21 February 2014 at 15:57:32 UTC, Thiez wrote:
> That is not true, Rust has several keywords that are more than 5 characters, such as 'continue'. The full list is here: http://static.rust-lang.org/doc/master/rust.html#keywords . It is true that they prefer short keywords over long ones.
I knew there was no hard-coded limit, but this "try to keep keywords short" sounds really stupid to me. No offence to designers, but I really don't think we should save some spar characters in 2014... I do all my coding on a remote SSH, but still I have plenty of screen space to spare ;)
My first glance:
"priv" instead of "private"... bleah! At least it's clear enough
"mut"... what is this? "mutable", "mutex", perhaps "mute"?
"impl" could be several different things, too, but I guess it's "implements"
And "continue" being a different keyword some time ago. In the end they changed it. Tons of discussions and stuff; was it worth saving 3 characters, after all?
I hope their standard library is at least WAY more verbose... Otherwise I pity casual Rust programmers :D
|
February 21, 2014 Re: Ada conference, Ada and Spark | ||||
---|---|---|---|---|
| ||||
Posted in reply to Francesco Cattoglio | On Friday, 21 February 2014 at 17:25:48 UTC, Francesco Cattoglio wrote:
> On Friday, 21 February 2014 at 15:57:32 UTC, Thiez wrote:
>> That is not true, Rust has several keywords that are more than 5 characters, such as 'continue'. The full list is here: http://static.rust-lang.org/doc/master/rust.html#keywords . It is true that they prefer short keywords over long ones.
> I knew there was no hard-coded limit, but this "try to keep keywords short" sounds really stupid to me. No offence to designers, but I really don't think we should save some spar characters in 2014... I do all my coding on a remote SSH, but still I have plenty of screen space to spare ;)
> My first glance:
> "priv" instead of "private"... bleah! At least it's clear enough
> "mut"... what is this? "mutable", "mutex", perhaps "mute"?
> "impl" could be several different things, too, but I guess it's "implements"
>
> And "continue" being a different keyword some time ago. In the end they changed it. Tons of discussions and stuff; was it worth saving 3 characters, after all?
>
> I hope their standard library is at least WAY more verbose... Otherwise I pity casual Rust programmers :D
Depends on how often and where you write those keywords. mut seems to be quite common and even in D I would not like 'reference' more than 'ref', especially since it is used in parameter lists.
|
February 21, 2014 Re: Ada conference, Ada and Spark | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tobias Pankrath Attachments:
| On 21 February 2014 20:00, Tobias Pankrath <tobias@pankrath.net> wrote:
>
> Depends on how often and where you write those keywords. mut seems to be quite common and even in D I would not like 'reference' more than 'ref', especially since it is used in parameter lists.
>
I think Rust's "pub", "priv" and "fn" are just silly. But I don't mind "mut". However it might've been nicer if you didn't have to write "let mut" but just "mut".
What made Rust a no-go for me was when I tried to write a generic sort. I still can't figure out how to swap two elements in an array ("vector"). The implementation in their std lib for "swap" has an unsafe block... (And I don't want a GC or RC requirement for the array.)
|
February 22, 2014 Re: Ada conference, Ada and Spark | ||||
---|---|---|---|---|
| ||||
Attachments:
| On Fri, Feb 21, 2014 at 12:06 PM, Matej Nanut <matejnanut@gmail.com> wrote:
> However it might've been nicer if you didn't have to write "let mut" but
> just "mut".
>
>
Something similar had been discussed if I recall correctly, and was
rejected. Consider: `let (x, mut y) = (1, 2);` which would otherwise have
not been possible.
|
Copyright © 1999-2021 by the D Language Foundation