[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
ITT: Post why you think C# is the best language of the last
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 33
Thread images: 4
File: csharp3.png (68 KB, 300x300) Image search: [Google]
csharp3.png
68 KB, 300x300
ITT: Post why you think C# is the best language of the last decade.

I'll start,
>Easy to learn, easy to use
>Extensive .NET library
>Pinvoke.net is great
>Safeguards the programmer from simple yet dangerous mistakes
>Highly flexible(web dev, all sorts of frameworks, mono, etc)
>>
File: 2015-01-17.jpg (99 KB, 600x450) Image search: [Google]
2015-01-17.jpg
99 KB, 600x450
>>51905496
>>
Okay, I'll bite. Got an internship to make web apps, asp.net with c# backend. Didn't now diddly about any sort of practical programming. C# really helped hone the skills and boost confidence. Been there for a year and a half now, so I can say I definitely like it and would recommend
>>
>>51905633
How did you do it without any experience or knowledge desu? Did you just learn on the job?
>>
>>51905681
I was the only one who applied and lied about what I knew. Thankfully the project was tossed to me and my supervisor who knew even less than I did (he's a QC guy, not meant to code), So he gave me the rundown on what they wanted and I made it. It was extremely difficult to get off the ground and there was a lot of googling, but I learned to honestly just rtfm and do it the hard way. Made mistakes and learned as I went. I'm no master of asp.net or c#, but I can at least code myself out of a box now
>>
>>51905740
Nice man.

That's one nightmare I got, probably explains why I'm unemployed.

Like I got a good understanding of programming in a few languages and some libraries and frameworks but I'm just terrified of working in the real world under time constraints, etc etc. I don't think I can just go with "Do x, y, z using a b c within x time". I'm much better just making my own shit however I want, whenever I want.
>>
>>51905918
Then, in my limited life experience I would suggest freelance work. If the creativity shines in independent work, it can be put to good use there. Then you can pad your resume if a professional job would cross your way. I hate what I do concerning the scope of my projects, but I like when I can get creative with it. Like you in that sense I'd much prefer to be independent but at the end of the day I need to pay the rent, so you do what you need to do. If you have the passion you can definitely shape it into whatever you want
>>
>>51905496

But will it get me bitches, bitches, bitches, bitches?
>>
File: jm.jpg (15 KB, 336x369) Image search: [Google]
jm.jpg
15 KB, 336x369
>>
>>51905496
>Safeguards the programmer from simple yet dangerous mistakes
That's what I hate most about C#/.NET
They often try the force you to do things the way they think is best and actively try to prevent you from doing it otherwise
So you always have to use questionable hacks to do things in a non-retarded way
>>
Rust
>inb4 mozilla
>>
We mostly used C# on school i never had any problems with it, unlike java which im using on my first job, i hate java's nullpointer exception.

>inb4 you're just shit
fuck off.
>>
>>51906740
...you're aware C# also has null object references, right?
>>
>>51906430
Like what? I'm really enjoying C# so far, and the only thing I have an issue with is the lack of multiple inheritance.
>>
>>51906759
Yes, i rarely encounter them on c#.
>>
>>51906813

do you get bitches?
>>
>>51905496
>OOP
>>
>>51906978
Yes. Everyone who uses C# gets bitches, unlike neckbeard C or C++ programmers who have no time to shave or shower because they have to write out 15 lines of code for every 2 in C#
>>
>>51906430
>not being able to learn different ways of programming
It goes to show how true the saying is: Really bad programmers can write COBOL in any language
>>
>>51906978
The receptionist sucks my dick under the table when I'm engineering LINQ statements, if that's what you're asking.
>>
>>51906813
In C# things like:
- almost no control over garbage collection
- almost no control over what calls are inlined
- forced bounds checking for managed arrays
- can't turn unsafe arrays into managed arrays
- can't create objects from pointers
- can't change the pointers of objects
- can't change a value type into another value type

In .NET:
- many arbitrary functions create heap garbage instead of using the stack
- some managed classes are leaking memory
- many graphics functions are crippled by pointless file & thread locks
- large buffers are often copied 2 or 3 times for no reason before the actual work begins
- large buffers are often allocated and immediately freed after use instead of using them again
- many functions require very specific value types and won't accept something generic even though it's identical in memory

etc...
>>
>>51907112
* also there's no way to add your own SIMD support and the tiny amount they recently bothered adding is very outdated and just barely an improvement over not using SIMD
>>
>>51907112
>>51907153
What does that mean for people who don't have autism?

What does this even mean?
>>
>>51906813
There's actually kind of a way around that, at least with methods, that being that you can define extension methods for interfaces.

Example:
public interface AnInterface
{
void DoSomething(double arg);
}
public static class AnInterfaceExtensions
{
public static void DoSomething(this AnInterface target, double arg)
{
//do stuff
}
}

public class A { }
public class B : A, AnInterface { }
public class Program
{
B Thing;
public static void Main()
{
Thing = new B();
Thing.DoSomething(1.2345);
}
}
>>
>>51907172
>Programming-related thread
>Not having autism
You must be a shit programmer.
>>
>>51907112
>garbage collection
>inlined calls
>unsafe
>pointers
Not really the point of C#, but if you need fast code you can use this:

[DllImport("C_Code.dll", EntryPoint="YourFunctionInC")]

public static extern void YourFunctionInC(int parameter);


>>51907192
Looks ugly, but I suppose it works. To keep the pattern, you could also use an interface in the same manner for A. Are extension methods slower than normal methods?
>>
>>51907172
It's not that important as a beginner
But once you do more advanced stuff the language becomes a lot less nice than it usually is
>>
>>51907300
Runtime speed => http://stackoverflow.com/questions/1442866/what-overhead-is-associated-with-an-extension-method-at-runtime-net

As for it looking ugly, yes. Extension methods should be avoided if possible, but I have had instances where I have had to do this, so I generally put the static extension class in the same file as the interface, so from the outside it looks and behaves like a class that can be multiply inherited. As such, I would definitely not use this for A, or any other class where methods being multiply inheritable is not absolutely necessary.
>>
>>51907300
That's not necessarily faster since platform invokes have more overhead than native function calls in C#
Also I can do everything I need natively in C# apart from the SIMD
And calls not being inlined when I tell the compiler to is just stupid
>>
>>51907515
* most problems I outlined in C# are only really problems when using mediocre 3rd party libraries like .NET
>>
>>51905633
Literally my story too
Feels good anon
>>
File: 1322781232235.jpg (66 KB, 600x772) Image search: [Google]
1322781232235.jpg
66 KB, 600x772
>know c#
>can put webdev AND appdev on resume
>>
>>51905496
Because it's not Java.
Thread replies: 33
Thread images: 4

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.