|
so whats up with rust, is it good? seems like it's good, but i may be wrong. needs more tooling support but jetbrains idea and youcompleteme already support it so thats all i really need.
|
# ? May 18, 2016 15:13 |
|
|
# ? Jun 11, 2024 15:04 |
|
i like rust. i dont know if its worth using yet but the language itself is solid & has good stuff. it's the libraries and tooling and stuff like that that was lacking last time i used it
|
# ? May 18, 2016 15:27 |
|
yeah from what ive banged out with it, it seems nice. i like the explicit lifetime declarations when needed. also trait based generics is cool and good
|
# ? May 18, 2016 15:33 |
|
Soricidus posted:or international, which doubtless you consider to be the same thing foreigners just had to use their own whacked out numbering plans instead of the NANP.
|
# ? May 18, 2016 15:38 |
|
akadajet posted:
|
# ? May 18, 2016 16:24 |
|
CRIP EATIN BREAD posted:yeah from what ive banged out with it, it seems nice. option types instead of nulls & immutable by default with explicit mutability are the two best features imho
|
# ? May 18, 2016 19:23 |
|
fart simpson posted:option types instead of nulls & immutable by default with explicit mutability are the two best features imho yeah plus being able to pattern match on things like code:
|
# ? May 18, 2016 20:05 |
|
is this new? for some reason facebook built a layer on top of ocaml to give it a more javascripty syntax
|
# ? May 18, 2016 20:49 |
|
JimboMaloi posted:is this new? for some reason facebook built a layer on top of ocaml to give it a more javascripty syntax yes, it was put out yesterday
|
# ? May 18, 2016 20:51 |
|
Facebook and Twitter etc have way too many employees for what they do meanwhile I'm over here being an army of one at my job
|
# ? May 18, 2016 21:04 |
|
https://facebook.github.io/reason/#syntax-basics-primitives that float operator is totally disgusting
|
# ? May 18, 2016 21:17 |
|
how do you parse 23.0 +.01 23.0 (float add) .01 or 23.0 (float add) 01
|
# ? May 18, 2016 21:42 |
|
thats brought over from ocaml, but its a weird thing to keep given the stuff that they changed. i think its because theres no operator overloading in ocaml?
|
# ? May 18, 2016 21:44 |
|
It's because types are inferred based on the operator.
|
# ? May 18, 2016 22:12 |
|
implicit casts are the the work of the devil
|
# ? May 19, 2016 00:41 |
|
tef posted:implicit casts are the the work of the devil truer words have never been spoken
|
# ? May 19, 2016 01:08 |
|
tef posted:implicit casts are the the work of the devil
|
# ? May 19, 2016 02:09 |
|
CRIP EATIN BREAD posted:yeah plus being able to pattern match on things like pattern matching owns
|
# ? May 19, 2016 02:13 |
|
agreed that implicit casting is terrible, but its not a casting issue i dont think? like in f# or sml,code:
code:
|
# ? May 19, 2016 04:29 |
|
doesnt f# have typeclasses or something like that?
|
# ? May 19, 2016 05:17 |
|
any language with overloading / type classes will have a defaulting rule of some sort just so you don't get embarrassing problems like 1+1 not type-checking
|
# ? May 19, 2016 05:24 |
|
fart simpson posted:doesnt f# have typeclasses or something like that? it does not
|
# ? May 19, 2016 06:40 |
|
Mr Dog posted:or uhm return boolean from the accessor instead of Boolean turns out the other end also didn't expect the Boolean field to ever be null, lol the field has now been changed to primitive boolean.
|
# ? May 19, 2016 08:21 |
|
returning Boolean sounds like returning a Maybe Boolean which is an entirely useful concept, but obviously Java is not set up to make that work right
|
# ? May 19, 2016 13:13 |
|
there's always Optional<T> and it hahahahahaha
|
# ? May 19, 2016 14:24 |
|
java 8 is cool but after working with some languages that dont allow null values or at least force you to check i just hate that entire aspect
|
# ? May 19, 2016 14:26 |
|
CRIP EATIN BREAD posted:java 8 is cool but after working with some languages that dont allow null values or at least force you to check i just hate that entire aspect
|
# ? May 19, 2016 14:44 |
|
you don't get to complain about null until you've used ruby for something non trivial
|
# ? May 19, 2016 14:55 |
|
MALE SHOEGAZE posted:you don't get to complain about null until you've used ruby for something non trivial ruby itself is not that bad imo but holy poo poo rails rails loves returning nils everywhere
|
# ? May 19, 2016 14:58 |
|
god gently caress rails
|
# ? May 19, 2016 15:04 |
|
Wheany posted:turns out the other end also didn't expect the Boolean field to ever be null, lol we had kind of the same situation with a Long productId: Java code:
|
# ? May 19, 2016 15:08 |
|
Optional<T> is the best retrofit you can hope for. As a band aid you can add Checker Framework to your build and it will throw an error if a null could slip in. Prior to Java 8 you'd use a boxed type if you wanted a nullable primitive. It's not a great situation but I'm not going to switch to some fad lang with zero library and tool support ecosystem purely to satisfy somebody's type system sperging. Besides, the fact that "byte" is signed is at least as bad. Somebody declaring a data member Boolean where it should never be null is somebody failing to understand their tool and then blaming the tool. As usual.
|
# ? May 19, 2016 15:26 |
|
Mr Dog posted:Optional<T> is the best retrofit you can hope for. As a band aid you can add Checker Framework to your build and it will throw an error if a null could slip in. Prior to Java 8 you'd use a boxed type if you wanted a nullable primitive. It's not a great situation but I'm not going to switch to some fad lang with zero library and tool support ecosystem purely to satisfy somebody's type system sperging. Besides, the fact that "byte" is signed is at least as bad. i always forget java's byte is signed and it's loving hilarious
|
# ? May 19, 2016 15:31 |
|
Wait what? So is it 9 bits total or only carries 7 bits of information? I like to think that it's the java designers ensuring the fail-fast approach wrt bit-janitors evaluating the language
|
# ? May 19, 2016 15:49 |
|
MALE SHOEGAZE posted:god gently caress rails it's bad
|
# ? May 19, 2016 15:50 |
|
gonadic io posted:Wait what? So is it 9 bits total or only carries 7 bits of information? It's 8 bits, so -128 to 127. I'm guessing they went, "Well all our other primitives are signed, so it'd be weird if byte were unsigned." The only difference would have been that widening conversions wouldn't do sign extension, right? I think we would have all gotten over it. Maybe if they'd added a special operator that does the "& 0xff" for you, it wouldn't have been such a big deal.
|
# ? May 19, 2016 15:55 |
|
CPColin posted:"Well all our other primitives are signed, so it'd be weird if byte were unsigned." it's even stupider than that because char is unsigned and 16-bit
|
# ? May 19, 2016 15:56 |
|
I'm going to call out into the void for a tef/monococqc paper dump what's the good stuff in terms of formal verification/specification languages?
|
# ? May 19, 2016 16:01 |
|
FamDav posted:I'm going to call out into the void for a tef/monococqc paper dump Not too knowledgeable there. The people I know who've been the closest to that have been using either Coq or Idris or Agda to write specific proofs or verified library. One of them used an extraction target from Coq so he could get verified data structures in another language, but otherwise I don't really know. Model validation and verification is also a thing, but I've never used them myself or read any papers about it that didn't have to do with specific implementations.
|
# ? May 19, 2016 16:23 |
|
|
# ? Jun 11, 2024 15:04 |
|
Mr Dog posted:it's even stupider than that because char is unsigned utf-16 is a blight
|
# ? May 19, 2016 18:19 |