Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

rust

Name: Anonymous 2012-01-06 18:14

rust seems quite nice (just looking at the docs)

anyone played around with it much?

Name: Anonymous 2012-01-06 18:15

It's what Go should have been, imo.

Name: Anonymous 2012-01-06 18:31

Finally some fucking real improvement on the system programming language side.
I, for one, welcome our new Rust overlords.

Name: Anonymous 2012-01-06 19:26

compiled, concurrent, functional, object-oriented, imperative,
compiled, functional, object-oriented, imperative,
functional, object-oriented, imperative,
functional, imperative,

functional, imperative,
functional, imperative,
functional, imperative,
functional, imperative,
functional, imperative,
functional, imperative,
functional, imperative,

lolwut

Name: Anonymous 2012-01-06 19:28

>>4
Meaning that it supports both paradigms.

What I like about it is that the default is immutable state.

Name: Anonymous 2012-01-06 19:38

>>1

use std;
import std::io;

fn main() {
    for i in [1, 2, 3] {
        io::println(#fmt("hello %d\n", i));
    }
}


I can't stop puking


use std;

fn fac(uint x) -> uint {
  if (x <= 1u) {
    ret 1u;
  }
  else {
    ret x * fac(x-1u);
  }
}

fn main() {
  log fac(5u);
}


Oh god it just keeps getting worse, i'm going to be sick tonight.

Name: Anonymous 2012-01-06 19:41

>>6
pls explain what u find horrendous about this code

Name: Anonymous 2012-01-06 19:48

>>7

suck::my::dick(#fmt("suck it %s\n","faggot"));
fn
-> return-type
{ }
log my::inconsistent:calling:convention("faggot");
use my::dick;
import your::1::inch:wonder;
;

Name: Anonymous 2012-01-06 20:13

>>8
>log my::inconsistent:calling:convention("faggot");

"Logging is presently implemented as a language built-in feature, as it makes use of compiler-provided logic for allocating the associated per-module logging-control structures visible to the runtime, and lazily evaluating arguments. In the future, as more of the supporting compiler-provided logic is moved into libraries, logging is likely to move to a component of the core library. "

altho i agree, they could have just made it look consistent no matter how it was implemented

>>8
fn

shortening "function" to "fn", not sure why that is so hate-able. commonly used things should be made more terse, no? perhaps you mean there should be no function keyword at all?

>>8
{}

there's 3 common "ways" to organize code structure: lisp parens, algol braces, and FIOC. imo, braces aren't worse than the alternatives.

Name: Anonymous 2012-01-06 20:16

>>9
algol

i meant C, sorry. i'm a dummy.

Name: Anonymous 2012-01-06 20:21

>>9
>>10
If it any Lisp, it's shit.

Name: Anonymous 2012-01-06 20:22

>>11
>ain't*

Name: Anonymous 2012-01-06 20:27

Rust is like Go, only less shitty in some areas and more shitty in others.

Name: Anonymous 2012-01-06 21:13

>>6,8
They're working on semantics first, that's not the final syntax, you goddamned moron. # denotes a macro. I agree that language-level logging is pretty retarded.

Name: Anonymous 2012-01-06 21:40

>>14
macro for formatting

sure fire way to make it shitty

Name: Anonymous 2012-01-06 22:21

>>14
So it's like Ruby, where they change things and break working programs going from 1.8 to 1.9.

Name: Anonymous 2012-01-06 22:24

>>14
so

#fmt("%d -> %d\n",i++,i);


would result in undefined behavior?

Name: Anonymous 2012-01-07 7:26

>>17
I don't know, I didn't try.
Probably you can't do that since everything is immutable by default and there's no ++ operator:
The main difference with C is that ++ and -- are missing,
http://www.rust-lang.org/doc/tutorial/syntax.htm

>>15
For printf-style formatting, it is necessary to find type errors at compile-time. I hope they find a way to put type-safe rest args in the mix and replace both log and #fmt.

Name: Anonymous 2012-01-07 10:59

>>16
This is a work in progress you shit nigger retarded fuck.

Name: Anonymous 2012-01-07 12:17

>>16
Yes, except it is from UNSTABLE-PREALPHA-DEVELOPMENT-BRANCH-DO-NOT-USE 0.0.0.0.1 to UNSTABLE-PREALPHA-DEVELOPMENT-BRANCH-DO-NOT-USE 0.0.0.0.1b.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List