[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 / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vip /vp / vr / w / wg / wsg / wsr / x / y ] [Search | Home]
4Archive logo
I got used to C# and want to lern some more...
If images are not shown try to refresh the page. If you like this website, please disable any AdBlock software!

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

Thread replies: 64
Thread images: 4
File: d3.png (14 KB, 160x301) Image search: [iqdb] [SauceNao] [Google]
d3.png
14 KB, 160x301
I got used to C# and want to lern some more native programming.
What advantages does D have over C?
>>
>>52593764
None. Learn C then C++ and maybe Rust if you want to learn something that MAY have an impact in the future
>>
D is best compared to C++, Go and Rust, not C. It is a larger, OOP language. It has a huge advantage over Rust in that it is a programming language not run by SJWs and literal communists. If you need proof of that, Walter Bright, the creator of the language, posted this on Hacker News just yesterday: https://news.ycombinator.com/item?id=10960141. Also, generics.
>>
>>52593764
None.
>>
>>52593764
None
>>
>>52594143
I can't even bring myself to care about the SJWs and literal communists in Rust, the language is going nowhere.
>>
>>52594205
They did innovate with the borrow checker. I hope a language with one eventually becomes popular enough to replace C++ or otherwise C++ adopts it.
>>
>>52594240
>borrow checker
Also fucking known a smart pointer.
>>
>>52594143
>Also, generics.
You can sort of have it in C by using a macro function that generates the data structures and functions with the wanted type
>>
>>52594257
It's two different things. Borrow checking is done even before compilation.
>>
>>52593854
This.

>>52594143
SJWs and literal communists meme.

If I recall correctly, this is based off that one incident a mozilla employee identified himself as a mozilla employee and spouted vitriol, then got fired?

Because I don't see that as being literal SJW communists. Believe it or not, Mozilla heavily depends on their reputation, and not being viewed as sexist and hateful has more view for a company than not being viewed as SJWs. I wonder why.
>>
>>52594257
An improved smart pointer. Read http://conscientiousprogrammer.com/blog/2014/12/21/how-to-think-about-rust-ownership-versus-c-plus-plus-unique-ptr/ to see the difference.
>>
>>52594316
Or just use Gnulib.
>>
File: kot ghoul.png (2 MB, 1217x879) Image search: [iqdb] [SauceNao] [Google]
kot ghoul.png
2 MB, 1217x879
>>52594143
> If you need proof of that, Walter Bright, the creator of the language, posted this on Hacker News just yesterday
So, if commies made a rocket before capitalists, by our logic capitalists shouldn't use rockets?
Also, as not-native English, I don't understand what does he mean by this post. Can you chew how it mades him a commie?
>>
>>52594346
>So, if commies made a rocket before capitalists, by our logic capitalists shouldn't use rockets?

uwotm8
>>
>>52593764
D really isn't meant to be compared with C. It's more of a C++ competitor

D has more features that will make your life a lot easier - templates, dynamic arrays, OOP if you want to do it, functional programming concepts - the big idea is that it's as fast as C++ and as broad as C++ while being so, so much more cleanly implemented, so it'll compile faster and it's a lot easier to learn (than C++)
C is faster - this is pretty much its point. You can get as near to the machine as you can without using assembly

The advantages of D are pretty well put out on their site
https://dlang.org/overview.html
but it's mainly aimed towards people who are coming from java / C# and want something faster, or people coming from C++ and wasn't something that isn't a giant fucking clusterfuck

The advantages of C are evident in the fact pretty much everything that has to be fast and interact closely with the hardware is written in it (the linux kernel springs to mind)

I would say it's best to learn C first so you can learn how your program actually works (how things are represented in memory, heap vs stack, compiler optimisations, instructions, registries, etc.), and then move into D when you want to start really enjoying it
>>
>>52594346
your* logic
>>
>>52594388
>ing from C++ and wasn't something
want*, not wasn't, sorry
>>
>>52594325
It isn't a meme. Steve Klabnik is on Rust's core team and does docs/community PC policing.
http://blog.rust-lang.org/2014/12/12/Core-Team.html
Here is a quote from him.
>Second, I'm not _strictly_ a communist: I'm certainly very left-wing, and I often role-play a communist, because I think Americans need a connection to an actual left. My allegiance is ultimately to Deleuze, not Marx. To put it in terms of a meme image I saw the other day, around non-leftists, I usually use 'communist' as a shorthand, but amongst leftists, a more nuanced discussions can be had, for sure.
https://news.ycombinator.com/item?id=9676630
>>
>>52593764
It's kind of C++ made in good, but it introduces its own flaws and even if it didn't, who would want C+++ instead of a new language?

>>52594325
>han not being viewed as SJWs.
Yet.

>>52593854
This one.

>>52594143
That's kind of my worries that Mozarella destroys it, but time will tell.
>>
>>52594425
Honestly Anon, your being way too kind, Klabnik literally threatens to murder Right-wingers on his Twitter.
>>
>>52594425
But mostly programming communities are based on communism, desu.
And having left-wing ideals != being leftist/commie. It is just "I think in the future it would be better that our society will be commies", it doesn't mean "I want to be commie now". You know, the robots doing robots in future meme.
>>
>>52594483
>But mostly programming communities are based on communism

Wrong, all programming communities are based on hyper-capitalism.

Open source is a capitalists wet dream, programmers are working for free in their spare time on products for private businesses to use.
>>
>>52594346
Using a language means interacting with its community if you want to submit a patch, ask for help and whatnot. Using an SJW language means interacting with SJWs I those situations. It doesn't make commie technology inherently bad; it's just more likely to expose you to commies.
>>
>>52593764
>learn some more native programming.
if that's all you want - learn C
>>
>>52594508
Also thanks for deflating your own wages goyim, keep pushing the "Every kid should be forced to learn programming" shit, it worked out so well for mechanics in the 60's.
>>
>>52594463
All the more reason to choose Hoon over Rust. UNIX is doomed anyway.
>>
>>52594542
Programmers' wages (at least outside the Valley) are safe because IQ.
>>
>>52594542
Every kid should learn some programming.

That's much more useful for education than teaching kids how to use Word (which is what computer courses in my high school did)
>>
>>52594346
Walter Bright is not a commie. He is saying that smart people become conservative with experience.
>>
>>52594568
You realize languages like Google's Go lets sub 100 IQ retards to program right? It was literally designed to be simpler than BASIC and doesn't require any more than high-school level mathematics.
>>
>>52594510
You know. I read how mericans made the nuclear bomb. At the beginning there were people with left and right-wing views (mostly leftists). One of the heads of the project was a commie. And other head was right-wing. So, the right-wing guy hated the first one because of this commie ideas and dropped the project. And mostly of right-wings dropped the project too. So, the project was made buy commies and they haven't bother on safety at all. One of the scientists was recruited by Kremlin and leaked all the data. That's what happens when you become hysterical pussy and drops a project only because people who don't agree with you have different idea.
>>
>>52594425
What a time to be alive. Only the left can do this shit.

I still don't consider this to be proof Mozilla is literal SJW communists. It proves that, like any big organization, it's been infiltrated. I don't agree with their overly paranoid way of doing things, but considering the current political situation it does make sense. There aren't many people who can clearly state their opinions without risking a lot, much less so companies.
>>
>>52594595
That's retarded.
Even C# is more noob-friendly than Go.
Not to mention Python.
>>
File: 1431534819450.jpg (12 KB, 367x202) Image search: [iqdb] [SauceNao] [Google]
1431534819450.jpg
12 KB, 367x202
>>52594632
>Even C# is more noob-friendly than Go.
C# fucking supports Monads, a feature that requires a PhD in mathematics to understand properly.
>>
>>52594595
They do so no more than earlier languages with hash maps built in. I suppose at worst junior web developers might suffer from that kind of competition but if they are any good they won't be juniors for long.
>>
>>52594640
It really doesn't.

Also, people who make their first Windows GUI won't even use them.

Lack of advanced features =/= easier
Just look at C-
>>
>>52594640
Meanwhile Go rejected Generics because they thought it would be to complex for their Indian clerks to understand.
>>
>>52594640
You are just trolling.
>>
>>52594670
Yeah, I'm sure they rejected a feature, that's commonly used in Java, because Indians.
>>
>>52594442
>who would want C+++ instead of a new language?
There are a few very clear reasons why someone might want to use D instead of C++

overall it's cleaner to read and write, mostly by being more syntactically consistent. An example would be that << in D is only the bitshift operator, not also overloaded for output to iostreams like in C++, but there are other things like not using < and > as brackets, and having a dedicated concatenation operator
it has a couple of more 'modern' things like foreach loops (as part of the language, not tacked on voodoo like C++'s version)

the biggest advantage IMO is that it compiles insanely quickly compared to C++, which means you can often write a lot faster code in it because you're less reluctant to change something out and try new things

oh and the templates are just astonishingly convenient
just for an example
int index(T)(T[] array, T t)
{
for (int i = 0; i < array.length; i++)
{
if (t == array[i])
{
return i;
}
}
return -1;
}

int main()
{
int i = index!char("Hello world!", ' ');
int j = index("Hello world!", '!'); // type can be omitted and deduced from the arguments by the compiler
}
>>
>>52594588
> Walter Bright is not a commie. He is saying that smart people become conservative with experience.
It's controversial statement. Because 99% of people become conservative with age. Does that mean that 99% of people are smart?
And the thing is that "conservatism" is not the antipode of "liberalism". Conservatism in different regimes is different. And liberalism in different regimes is different.
I live in Russia and for us liberalism is something near to American Republicans. And conservatism is picrelated.
>>
>>52594699
Yeah, but C++ is pretty shitty to begin with.
>>
What about Crystal and Nim(rod)?
>>
>>52593854
>the you need to learn C before C++ meme
no, the maker of C++ himself said that's a dumb idea. Start with C++
>>
>>52596365
What about them?

Shallow impression is that Crystal still want to tweak semantics a little before finishing the language and Nim is pretty much a one-man ego trip that leaks C semantics.
>>
>>52596365
>Nim(rod)
It's just Nim now.
>>
>>52594699

I don't see anything in D's features that isn't part of C++ already or can be done on C++, all it's doing is throwing the STL out with the bathwater and trying to be a special snowflake
>>
>>52594625
Maybe Mozilla might be not, but Rust is in control of SJWs making it in their plaything
>>
>>52601047
I don't exactly see the relevancy of this. They can't do anything to any user of rust, nor is rust anything more than a set consisting of a language, a package manager and some tools to aid in development. Whether the people are SJWs or not is essentially irrelevant; if it actually becomes relevant in the future, the project is open source and a fork can be made to continue it under patronage of sane people. In the end the most important thing is how good the language and ecosystem is; so far, the language is IMO one of the better ones and the ecosystem benefits heavily from a friendly community (and before you say SJWs, no, I don't care; I don't discuss politics with people on IRC on #rust because that's pointless shilling)
>>
>>52601374
>>52601374
do you expect me to read all that
>>
>>52601466
It's 3 lines. Is that really that long? How short is your damn attention span?
>>
>>52597125
>Creator of something said that his product is better
>listen to creator of something

Words like live by, good goy.
>>
>>52599265
How badly does Nim leak C semantics?
>>
>Klabnik
Remember when he bullied a senior programmer to tears? https://harthur.wordpress.com/2013/01/24/771/

Good times.
>>
>>52601914
Not sure, but I think it was about integer overflows, so not the worst thing I ever encountered. You may want to research yourself, though.

>>52601988
Kek.
That will teach both fag sides not to use clear names in the long term. The programming community could use more guys like Klabnik.
>>
You may also want to look at Haxe and soon Swift as C# alternatives that don't rely on the CLR/JVM or as a sort of C++ with GC.
>>
>>52603450
Mind you the GC implementation is crap. Or at least was, last time I checked.
>>
>>52603450
Haxe is not even a viable alternative to shooting yourself.
>>
>>52601668
He didnt say that C was less than C++. Just that learning C just to learn C++ is dumb, which it is
>>
>>52605011
Do you mean Swift's?
>>
>>52605542
C is less than C++ unless C++ overflows.
>>
>>52605628
No, Haxe, but Swift has another problem...
>>
>>52605906
What kind of problem? It better not be "it's made by Apple".
Thread replies: 64
Thread images: 4
Thread DB ID: 475460



[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 / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vip /vp / vr / w / wg / wsg / wsr / x / y] [Search | Home]

[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 / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vip /vp / vr / w / wg / wsg / wsr / x / y] [Search | 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.
This is a 4chan archive - all of the shown content originated from that site. This means that 4Archive shows their content, archived. If you need information for a Poster - contact them.
If a post contains personal/copyrighted/illegal content, then use the post's [Report] link! If a post is not removed within 24h contact me at [email protected] with the post's information.