Is there a worse language? Because I think not

Is there a worse language? Because I think not.
This shit needs to die already.

Attached: csharp.png (280x280, 11K)

No `const` parameters
SDK has opt-out telemetry
No `Option` for reference types
`MSTest` not portable
Can't index on `foreach` loops
Can't access a subarray in a multidimentional array with a given index

foreach (var val in arr) val += 2; // compile fails
for (int i = 0; i < arr.Length; arr[i] = arr[i++] + 2) { } // works

foreach(var i in evens){} // error
int i = 22; // wont work because i is now declared at the top somehow
for(int i = 0; i < 10; ++i){} // works somehow?
---
{
int x = 4;
}
int x = 3; // Considered Harmful
---
public class Test {
public static void Main()
{
var x = new int();

if (x is int i) // i is now in the scope
{
// do things
}
// hundreds of lines later
for(int i = 0; i < 10; Console.WriteLine(i++)){} // uh oh
}
}
---
var a = String.Format("A {445}", "B");// 0 warnings, 0 errors
// runtime crash

java

kys seething javajeet

commence the cope

Attached: 1534935983694.jpg (1291x3600, 610K)

>Is there a worse language
I can't decide between Rust and Java.

>I can't decide between vs
Whatever you say rajeesh. Here's your bingo point.

Is this from bizarro Jow Forums?

>Can't index on `foreach` loops
foreach is garbage but there’s nothing you can’t do without a for loop
>Can't access a subarray in a multidimentional array with a given index
Sure you can

>10x efficient language
loses to C and C++. also, dial8.
>10x more employable language
t. babu panjeet

Attached: maxresdefault(2).jpg (1280x720, 101K)

>>Can't access a subarray in a multidimentional array with a given index
>Sure you can
Oh yeah? In a multidimensional array in sane language, you can access an slice like marr[n], returns you nth slice/array. Not in C#.

you're talking about matrix [ , ] which is linear in memory. use jagged arrays and read the spec, petty child.

Write an extension method that will do that or use an array of arrays.
btw all of is irrelevant.

jagged arrays are not arrays, as in fixed size static arrays. I didn't even use the word matrix. I'm talking about multidimensional array, array of arrays. You cannot access an array from a MDA in C#. Calling me child won't help you deflect.

>btw all of is irrelevant.
That's some low quality cope. Enjoy your trashlang hoisting variables out of the scope and polluting the scopes behind your back.
for (val in arr){}
// now val pollutes the outer scope.

>jagged arrays are not arrays
okay retard

You deliberately missed the later part. Is this your defense mechanism?

it's preferred to use generic lists over arrays in .NET, and this is just one of the many reasons. If you're going to complain about a language, at least try using it properly first.

>Is there a worse language?
no.
it's not even C or C++
it has a horribly slow vm like Java
unlike Java it is not portable
C# is an absolute shit

i'm not saying c# is a good lang, but god is it fucking comfy to write

So the "proper" use of static arrays in .NET is ditching it for List? What a shame.

>jagged arrays are not arrays
>I'm talking about multidimensional array, array of arrays
A jagged array IS an array of arrays, retard.

Arrays are not growable.

And jagged arrays are not growable, your point?

Which makes them different data structures. You can stop your mental gymnastics now, you know full well what I mean by static mutli-dimensional arrays.
>doing it for a trillion dollar company for free
what a loser

jagged arrays ARE fixed size, lobotomized namefag

>arrays are not growable
>jagged arrays are not growable too
>which makes them different data structures
What? Sorry, I'm too brainlet to understand what was your point here, how can a jagged array be a different data structure if it's quite literally IS an array?

Jagged arrays' inner arrays are different in size, they are not static/constant. You can grow the sizes of the arrays you can put in there.

because they are not linear in memory and a multi-dim array is guaranteed to be so because it's just one array that can be accessed using x, y coords. get it now?

Jagged array: int[][,] jaggedArray4 = new int[3][,]
{
new int[,] { {1,3}, {5,7} },
new int[,] { {0,2}, {4,6}, {8,10} },
new int[,] { {11,22}, {99,88}, {0,9} }
};

Multidimensional array: int[,] array2D = new int[,] { { 1, 2 }, { 3, 4 }, { 5, 6 }, { 7, 8 } };

In C#, you can't access a row OR a column of a multidimensional array. Stop doing gymnastics.

You can access neither a row or a column in [,]. NEITHER.

there are no bad languages
only bad programmers

Imagine you have a truth-table:
bool [,] array = new bool [3,3] ;

true true true
false true false

Try access either the row or column. You can't.

I've kind of been trying to avoid C++ but there are 2 C++ compiler backends that I want to use and a C++ project that I want to contribute to. I've written about 2000 lines of it, wasn't too bad, but I just don't like the idea of trying to learn such a massive language. And I don't really like OOP.
Does anyone just ignore the OOP abstractions in favour of the functional abstractions? And ignore crazy templating, Boost etc.?

Wait what? Who the fuck uses arrays in C#? Use lists or sets instead.

what part of `one array' do you not understand?

This. The WORST thing about C shart is hoisting. What you write:
{
int x = 4;
}
int x = 24;

Perfectly valid code because x is inside a scope that ends earlier. But NOO. What Microsoft thinks you need to compile:

int x;
{
int x = 4;
}
x = 24;
Which obviously breaks your code. This is disgusting.

But languages are made by programmers so if the programmers are bad then the languages they've made are also bad.

what if bad programmers made a new language?

No, OP. There isn't. C# is seriously cancer. The sooner it dies the better.

C# IS portable since .NET Standard and .NET Core and even WinForms and WPF are portable with the next release of .NET Core 3

Oh, I remember you, OP. You are a retarded student who has no idea what he's talking about!

>pajeetcode