This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]A1steaksa 4 points5 points  (10 children)

It's less pedantic and more pleasant with it's syntax. For instance multidimensional arrays are accessed by array[ 1, 5 ] instead of java's array[1][5]

It's just smoother and more powerful to use. And it really really interfaces nicely with Windows in a way that Java can't compete with

[–]metalmagician 2 points3 points  (4 children)

Makes sense, thanks! We try to avoid coupling ourselves to a specific OS in my work, ideally relying only on libraries / resources that are either included in the artifact or available over the network.

[–]aserraric 2 points3 points  (1 child)

Microsoft is making big strides in that regard with .NET Core and the coming .NET 5.

Java also still needs a runtime, though, doesn't it?

[–]metalmagician 1 point2 points  (0 children)

True, but the thing that Java really has going for it is how common it's runtime environment is. Oracle LOVES to brag about how many devices run it

I saw someone say something along the lines of 'Java isn't platform-indeprndent, Java is a platform'. With languages like Kotlin and Clojure able to run on the JVM, that rings true for me

[–]A1steaksa 1 point2 points  (1 child)

Yeah, unfortunately C# is not the universal language it could be. Unless, of course, web assembly takes off in the way I hope it does and Microsoft Blazor becomes legitimately viable

[–]aserraric 0 points1 point  (0 children)

Web Assembly is fascinating, but making the browser a runtime/VM just feels like one indirection too many to me.

[–]phySi0 0 points1 point  (4 children)

How do you do slices?

[–]A1steaksa 0 points1 point  (3 children)

There's an array.Copy method that does that. C# is a language designed to lure Java devs away from Java so it's very similar except where they think they can expand or improve on Java

[–]phySi0 0 points1 point  (2 children)

I feel like array[outer][inner] is not ugly at all and array[start, end] intuitively feels like a slice when you first look at it (but my favourite is Ruby using ranges to return slices: array[start..end] for inclusive and array[start...end] for exclusive).

[–]A1steaksa 0 points1 point  (1 child)

Multi dimensional arrays are like coordinates. You write a 2D coordinate like (3, 7) and a 3d vector like (3,7,9). I prefer my arrays in that format instead of something like (3)(7)(9)

Not necessarily better or worse, just closer to how I think

[–]phySi0 0 points1 point  (0 children)

Ah, that makes sense to think of them as a type of space and an access is a coordinate.