The way I interpret that Rust is modern and next-generation:

It gives me a better experience by being intelligent under the hood.
- it assures me that under normal circumstances, segmentation fault and
memory leaks are impossible
- friendly compiler messages
- ensuring exhaustive matches for a pattern (compile time)
- let destructuring `let (x, y) = (3, 4)` and expression assignments
- last expression is returned
- allows me to skip return type in a function signature when there isn't
any, empty argument list can be omitted from `do` syntax
- inferred stack closures, inferred parameter passing modes, default
mutability
- syntax sugar, syntax extensions
- `task::spawn` syntax and task multiplexing, leverages multiple cores of
CPU by itself/scheduling
- lot of sigils have different meanings contextually; pipe operator is
interpreted differently in match arms and expressions
- built in log
- and the big one: type inference
sample effect - the programmer need not explicitly express `%s`, `%d` in
the sprintf-like `fmt!` (use rustc --pretty typed to see it in action)

Also, its not conservative, offers lesser restrictions, and allows me a lot
of quirks.
- nested modules and functions
- declare synonyms for a type and cast using `as` to interoperate
- multi-paridigm: C like syntax and operators, has functional concepts -
vec core library has head, tail, init, last, map, filter, foldl, foldr,
zip, all, any, contains, each, concat, connect, append, len and dozens of
other functions; and then there's pattern matching, ADTs
- FFI to interoperate with C code - unsafe code but neat mapping (though I
never got this working because of a bug)
- rename identifier when importing
- no FIOC
- managed boxes (GC) and finer controlled unique boxes
- built in things like str vs more optimized ropes
- attribute/annotations/directives to override certain behaviours (eg. new
types are Camel case but there's `#[allow(non_camel_case_types)]`)

Its clean and smart but consistent.
- Generic
  type: `~[int]`
  value: `~[1, 2, 3]`
  type: `~[~str]`
  value: `~[~"a", ~"b", ~"c"]`
- struct
  define: `struct Point {x: int, y: int};`
  value: `Point { x: 1.0, y: 2.0}`
- traits act as nice interfaces/type classes and blend well with generics
- modules, types, values have different namespaces - this means that you
can have the same name for the module identifier, type and the value, so,
no need for case conventions to avoid conflict, if you are not into that
sort of thing

- just another Rust user (also, pardon my terminology ignorance, not
well-versed with the PL lingo).


On 9 November 2012 04:19, Daniel Patterson <[email protected]> wrote:

> On Nov 8, 2012, at 4:38 PM, Nathan wrote:
> > I'd recommend writing a variety of small toy scripts, text-book
> > algorithms / data structures, or whatever other small applications you
> > are interested in for awhile.
> >
> > You may find that the syntax grows on you.  That's been the case for
> > me.  Actually I think this is true, for me, for all languages once
> > I've invested sufficient energy in writing and reading the language.
>
> I feel the same way. It seems that large amount of time has been put into
> the syntax, and I think it really shows. There is a consistency that is
> really nice to work with.
>
> The two languages that I spend the most time in are Python and Haskell,
> both whitespace delimited, and I find that I am actually happier
> programming in Rust (modulo any problems to be expected in a new/not
> complete language). I find the braces to be useful visual indications of
> blocks, and the semicolons are a nice way of saying "this is a statement"
> (or, another way of saying that is 'ignore the result of this expression').
> _______________________________________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/rust-dev
>
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to