Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Dewie
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
47 ms
·
301.
▲
by
Dewie
12y ago
Dude you went to MIT? That's rad. EDIT: why downvote someone for complimenting them on their top schooling?
302.
▲
by
Dewie
12y ago
The concept of references was introduced in my introduction to Java course I guess at the same time that the concept of objects were explained more fully. At least in Java, I feel that you have to understand the concept of references, to be
303.
▲
by
Dewie
12y ago
> I would also like to add that your argumentation is quite unpleasant to me. I read it as you believe that diversity is this annoying thing that destroys the good ol' "all dude internet". So you're saying that men (r
304.
▲
by
Dewie
12y ago
> Not sure why you need (int, bool) when you can have struct{i int, b bool}... You tell me: you for some reason do need (or want) multiple returns. Why, when you can just use a struct? ;) > the tuple you have to access via index, and
305.
▲
by
Dewie
12y ago
Maybe he means more like "four cores is as good as it gets" (for certain domains). We can always want things to get harder, faster, stronger , but delivering on that is another matter.
306.
▲
by
Dewie
12y ago
> Nothing at all. But sharing objects between threads is unsafe. If sharing stuff between threads in Rust is unsafe, then that is a bug which you should report. > You can prove that VM code is memory safe? Good for you. Uh, that'
307.
▲
by
Dewie
12y ago
> It is common to use ARC What is unsafe about using atomic reference counting? > and unsafe shared memory access in Rust. That should be provided with a safe interface, or an unsafe interface if calling that code is not safe. As for
308.
▲
by
Dewie
12y ago
I don't get what a Rust GUI would give you, in this case?
309.
▲
by
Dewie
12y ago
Doesn't OCaml have bad support for concurrency, though? Concurrency is one of the features that people who look into Go are often after.
310.
▲
by
Dewie
12y ago
I was at a lecture about security in C/++ code a couple of weeks ago. His conclusion was basically: > There are no silver bullets with regards to safety in C/++ code; in order to achieve security, the programmer has to pay the
311.
▲
by
Dewie
12y ago
With that in mind, I tried to use the phrase in a more wide sense than some other language communities would. But you're right that that phrase might as well be disassociated with the language at this point, to avoid confusion. Better
312.
▲
by
Dewie
12y ago
I don't really see it - a language made for systems programming (read: non-application development) being used for developing Android apps? Or is there some other kind of Android development in mind, here?
313.
▲
by
Dewie
12y ago
> Also, I'm in college for computer science and the school will only teach Java courses. It's dreadful and maddening. Classical inheritance is complete shit. Compiler error messages suck. The language itself is just too bloated
314.
▲
by
Dewie
12y ago
> False is not a valid value for an error... Welcome to static typing ;). I'm confused. Previously you gave this example: a, ok := m[1] // returns 0, false Which means that `ok == false`. But how can it be false i
315.
▲
by
Dewie
12y ago
> What's the difference between that and multiple returns? It's a more general concept than multiple returns. Why special-case something, needlessly?
316.
▲
by
Dewie
12y ago
Java and JS have both been at the butt end of many a joke, probably including satire.
317.
▲
by
Dewie
12y ago
Can't I just take your glib statement and just reverse the roles (JS developer not understanding Java)? What makes JS development more misunderstood than Java development?
318.
▲
by
Dewie
12y ago
"Result" is a pretty opaque name: any value or type can be called a "Result", really. "Either" at least hints to the fact that it is either-this-or-that. "Either" is IMO a nice counterpart to tuple ty
319.
▲
by
Dewie
12y ago
Just invoking BlubParadox seems condescending.
320.
▲
by
Dewie
12y ago
> If something other than an Auth\Role object is passed in, a runtime exception occurs. I think that would be called strong typing (as opposed to type enforcement).
321.
▲
by
Dewie
12y ago
> Sure, PHP has its warts — every language does. Some more than others.
322.
▲
by
Dewie
12y ago
So now we have Windows and Unix-likes... well at least it's not a monoculture.
323.
▲
by
Dewie
12y ago
> What's the difference between a nil map and a non-nil but empty map? A nil map is the absence of a map. An empty map is an empty map. The distinction is clear.
324.
▲
by
Dewie
12y ago
> Go doesn't have tuples because they aren't very compatible with compile-time type safety. What's the problem? Couldn't you have something like: (string, int) For example in the return type of a function? I.
325.
▲
by
Dewie
12y ago
> But yes, I meant socialist as in the government owns and controls aspects of the economy, with profit maximization often not the goal of those industries. That already has a name: mixed economy. "Socialist" in the American ve
326.
▲
by
Dewie
12y ago
> In Europe you have different views of how markets should be regulated. In the US, deregulation and free markets are the de-facto assumption, but many European economies proudly trend more socialist than we do. Europeans in general seem
327.
▲
by
Dewie
12y ago
> What I find most amazing is how the kernel is more like a file system multiplexer. Its job is to present a file system to each process built from mounting virtual file systems from all sorts of programs and remote machines. Wow, that s
328.
▲
by
Dewie
12y ago
> Go has effectively built in option types - multiple returns... They're more like a tuple than an Option type. An Option is a sum type, and a tuple type is a product type... and Option types are never represented as a product type
329.
▲
by
Dewie
12y ago
That doesn't seem nice if the map wasn't supposed to be nil (if you assume that failing fast on buggy behaviour is good). But I guess you might want to, on purpose, instantiate and use a map which is nil?
330.
▲
by
Dewie
12y ago
I think there is a difference, and for the worse: `0` is a perfectly valid integer value which can be used like any other value. `null` is a valid reference value, but is invalid as far as dereferencing goes; refer NullPointerException. `0`
More ›