Find a flaw

Find a flaw

Attached: csharp-e7b8fcd4ce.png (512x512, 13K)

It isn't C.

I've tried to get into it before but it's just fucking gay. Like how an Array has a Length, but a List doesn't. and you can't assign something not const to a const variable (by copy. I don't know why either, but the compiler complains at const int something = ReturnsInt();)
no RAII (Car car = new Car())
easy to miss what's public and what's private (on C++ you have whole blocks of public/private/protected stuff), plus having to explicitly specify access for each function/member
in/out/ref is fucking gay
a a few more I couldn't get from the top of my head

Microsoft.

Attached: 1540203060385.png (1888x1224, 454K)

A list has a count

either I'm too brainlet to have missed that, or it didn't show up in the autocompletion menu. true that I didn't search because it didn't bother me enough, I ended up using a fixed-size array with an offset. still, very unintuitive

.Count()
const is compile time only
using(var thing =new Thing()){}
this one I don't understand what the problem is.
this last one is true though.

>you can't assign something not const to a const variable
Do you know what const is?

I believe constants are needed during the compilation time, so you can't assign them values from runtime functions.

It's just fucking Java in drag.

>Do you know what const is?
yes. at least I think I do. it's something immutable
>so you can't assign them values from runtime functions
I see. I see const vars as variables I initialize with some value and won't change it later on. not really a valid complaint, they have the right to do things differently, I was pointing out what I thought was weird
>this one I don't understand what the problem is.
the public/private stuff? in C++ I organize my classes like this
class foo {
private:
// private stuff
public:
// public stuff
};

and I know just by glancing at it what's private and what's public. having
// ...
public void foo();
private void bar();
// ...

can be a little confusing at times. again, just my personal opinion

every time people trying to shit on c# it looks like this, someone who have 0 experience with language got distracted by things that doesn't work the way he expected because of inability to understand that there is always other of doing something than the one you've learned

Pajeets

gay icon

most coding conventions sort C# class members by accessibility, with more public members being further up and the members being grouped as follows:

constants
fields
constructors
properties
methods

>proprietary java that only works well on w*ndows

Attached: is_this_guy_serious.jpg (766x717, 111K)

It's literally the most comfy language. Fun as hell to write in and easy to get a job with. Someone's gotta fix up all the Pajeet code.

Windows

structs have annoying limitations for no real reason (why can't I declare an empty ctor?)
garbage collection and lack of scope control (you do have using(...) syntax but that is nowhere near as powerful as C++)
accessors may produce side effects (this can be a feature but it can also be harmful)

macroshit

vertx is based

I see. not bad, actually
> someone who have 0 experience with language got distracted by things that doesn't work the way he expected because of inability to understand that there is always other of doing something than the one you've learned
it's not just for being different, but fixing something that wasn't broken, and in an unintuitive way. probably it's intuitive for you. that's just my personal opinion though. I prefer C# to java when making desktop applications or multi-platform stuff (without a lot of #ifdefs in C/C++)
also .NET Core is pretty cool, and it's getting WPF soon
IIRC last time I was showcasing the difference between structs and classes to some friends at uni, and I said that structs have fields public by default, and as it turns out, on C# that's not true. why

In C++ structs are just classes with default public fields. (Although be careful, if a template demands a struct T you cannot give it a class, and vice versa)

But in C# structs are totally distinct from classes, calling new on a class allocates on the heap, GC style, but calling new on a struct just fills in data that already exists on the stack, like in C++.

Also you seem to think C# is a bad language, it's actually very good. Those three complaints are the only legitimate ones I have after using C# for 3 or so years. It's a feature rich language unlike Java.

>calling new on a class allocates on the heap, GC style, but calling new on a struct just fills in data that already exists on the stack, like in C++.
oh now that's cool. didn't know that
>Also you seem to think C# is a bad language
no, no, that's not true. when I'm listing bad stuff about something I can be a little harsh, and I'd probably say similar stuff about C++.
>It's a feature rich language unlike Java.
although you can say Java is catching up these days, C# still have a number of advantages IMO, like Unity support, Visual Studio, pointers, easy interop with C++ and probably a few more. I may not use it very often, or be a big fan of all it's aspects, but it's not bad at all

>no sum types
>no powerful means of metaprogramming (this is why everything is full of "frameworks", config shittery and attributes slowly dispatched at runtime)
>no immutable variables, come on, even Java has that
>repeats some mistakes of Java
>everything must be classes
>problems with contra/covariance, the compiler also shits its bed in some base declaration cases
>also
>whole compilation model

7/10 better Java 8 I guess

>>no sum types
If you have rank N types you implicitly have sum types.

You just won't like how it looks.

My personal biggest problem with C# (or rather, .NET and it's goal to be backwards compatible all the way back to version 1.0) is that collection interfaces are horribly broken and full of broken promises.
Array implements IList but throws on Add().
IReadOnlyCollection and IReadOnlyList don't specify Contains() and IndexOf().
IEnumerator specifies a method which Microsoft recommend implementations should throw an exception from as they admit it was a mistake to even include it.

LINQ is great but everything else about collections suck.

>if you nest C unions into structs with a flag you have sum types
>You just won't like how it looks.

And I forgot:
>MS felt the urge to bundle LINQ with a shitty query syntax

There's no way to constrain such a tagged union to only contain those variants in C, so it doesn't count. There is such a way in C# - almost. But once again, it's ugly.

please refrain from further use of disgusting Hasklel lingo

if you add int32 and int32 to make int64 you implicitly have sum types

and you'll like how it looks

>There's no way to constrain such a tagged union to only contain those variants in C, so it doesn't count.
What makes you sure you can't just cobble a macro around it?

>and you'll like how it looks

>Find a flaw
Runs best on Windows.

you don't?

query syntax is pretty good, automatically better than SQL simply because it puts "from" before "select"
the only thing that sucks about it is that it only covers a subset of the LINQ members leading to ugly frankenstein code whenever you want to slap a ToList() or Skip().Take() onto the end of it.

That must be the most retarded thing i have read on Jow Forums today. That said, I've only been here for 2 minutes today.

thanks

Attached: 1540912112929.png (512x512, 18K)

And if they had time traveled into the 70s and fixed SQL that would be great, but adding such a DSL into C# where you already have a superior to read/write/maintain language (C#) only to impress some Oracle consultants is damn retarded. You must have a damn good reason to create a DSL and it clearly must be logically restricted to its domain and that clearly isn't the case here.

Anytime.

>no RAII (Car car = new Car())
I believe that it'd make no sense in a managed language, but I could be wrong.
>easy to miss what's public and what's private (on C++ you have whole blocks of public/private/protected stuff), plus having to explicitly specify access for each function/member
Agreed, this meme is pushed too hard in too many different languages. Why can't we just have both modifier and modifier:.
>in/out/ref is fucking gay
It kinda is, but only because it lacks functionality like ref storing. It has very limited functionality in general. It's a nice syntactic sugar for retards who can't into real pointers.

Basically and

>I believe that it'd make no sense in a managed language, but I could be wrong.

It's more that in this case 'car' is a reference which can be passed elsewhere and in a garbage collected language, this makes it's destruction non-deterministic.

then make your car an IDisposable? thats exactly its purpose, to make its destruction deterministic

>no immutable
what are consts?