Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I love the idea of Rust, but...

Shorten 'mutable' to 'mut'

Seriously? Are we editing with TextEdit in this day and age?



In JavaScript we have function, when we could be having fun.


The ret and crust keywords also irk me.

In ye old time Unix tradition, the Rust developers favor extreme brevity. :)


Yeah, I found "crust" to be rather counter-intuitive. I think one of the reasons that bugs me is that "ret" and "mut" don't have any intrinsic meaning in English, but my brain insists on reading "crust" as if it were a word.

I'd personally have gone with "rustc".


"rustc" is how you invoke the compiler from the command line, that's no good. :)

I do seem to remember that the devs were passively soliciting ideas for a better name for this keyword. The great thing about a language at this stage is that if this really bothers you, then you can petition to have it changed!


How about externc, hinting at C++'s extern "C" for C++ code that will be visible (unmangled) to C code?


I actually like that a lot - relatively short, to the point, and doesn't have any conflicting intrinsic meaning.


Is it worse than shorting "integer" to "int" or "begin scope" to "{"?


I think your first point is valid, but Punctuation has other advantages, the symmetry between {} and the distinctness of the symbols (Taller than most, for instance) provide other advantages for the later.


This irks me to bits. You need to be an ambidextrous octopus to get a { out of my (non-US) keyboard.


The problem is many languages are designed on US keyboards. And even engineers who are otherwise mindful of unicode and other internationalization problems, may trivially forget what keys may not be on other keyboards.

I suppose your best bet may be to muck a bit with the key bindings of your particular text editor. IMO, I already swap some keys around to make () and {} more usable.


continuing this tangent, I'm not a fan of closing blocks either; I much prefer indentation http://williamedwardscoder.tumblr.com/post/18319031919/progr...


Yeah, Significant whitespace is why I won't code in Python anymore. Also, the linked article's comparison of Haskell and Python on readability is an awfully poor comparison, Haskell has notoriously terse syntax, In comparison to Python, which is nearly designed with the sole purpose of having good looking syntax.


but that was the very point of comparing Python and Haskell.

FWIW the Haskell crowd were super-defensive and claimed that Haskell is super-readable (by them).

Now in that article I talk about 'curly bracket' languages in general, meaning those that use symbols (words) to denote blocks rather than indent. And I don't like reading them because of that.


I wonder which programming language's syntax requires the least shifting? On my (en-US) keyboard, the following punctuation does not require shifting:

`-=[]\;',./


Curiously though, many popular languages are created by non-English natives.


The syntax could be made much better by focusing on usability and readability. It seems unimportant at first, but I know people get turned off functional languages because of this, and people go so far as to maintain alternate syntaxes and toolchains for Erlang, OCaml, JavaScript. Take a page from one of the “executable pseudocode” languages and their very clean syntaxes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: