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

C is a disservice to intelligent programmers. It has almost 0

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 334
Thread images: 36

File: unnamed (1).png (26KB, 371x395px) Image search: [Google]
unnamed (1).png
26KB, 371x395px
C is a disservice to intelligent programmers. It has almost 0 features that a modern and intelligent programmer uses to be productive. Since C is such a timesink, it's popularity is falling more than any other languages in the market.
C is dying and it should die ASAP. C programmers are actually retards in general. C is a small language to grasp, exactly the kind of shit that makes things retard friendly.
C has no advanced features like C++ does.

But as a newfag you are kinda in the right direction. C is for newbies. Think of it this way:
During ancient times, counting to 10 was a big deal and a person who could count to 10 was considered to be "wise".

Fast forward a few century counting to 10 is so trivial we teach this to toddlers. Now toddlers appreciate the vast "knowledge" of counting to 10 while matured brains are busy with modern technologies.

C is from stone age and the people who still preach it is like overgrown toddlers that can't learn advanced things. C is for lesser programmers.
C doesn't have delegates
C doesn't have resizable arrays
C doesn't have strings
C doesn't have string concatenation
C doesn't have namespaces
C doesn't have exception handling
C doesn't have closures in the standard
C doesn't have unit tests
C doesn't have Function overloading
C doesn't have memory safety of any kind
C doesn't prevent memory exploits and has no bounds and runtime checks
C doesn't support dynamic method loading/creating
C doesn't even have generics and templates
C doesn't have meta programming
C doesn't have mixins
C doesn't have higher order functions
C doesn't have contract programming
C doesn't have inner classes
C doesn't have function literals
C doesn't have array slicing
C has a very limited support for implicit parallelism
C doesn't even have string switches

C is a cancer that plagues the modern software industry
>>
C++ fags BTFO!
>>
What would be an acceptable alternative for C in low-level programming?
>>
doesnt that just mean that none of those "features" are necessary?
>>
>>60266958
C*
>>
>>60266962
Forth
>>
Code monkey programming in higher level OOP languages and it always bugs me
Are there C standard libraries implementing basic structures as lists or hashsets or everyone has to implement them on their own if they want to use one?
>>
>>60266947
Too bad i can't program my 8 bit microcontroller with 255 bytes of RAM in whatever meme high level language you use
>>
>>60267013
>Are there C standard libraries implementing basic structures as lists or hashsets or everyone has to implement them on their own if they want to use one?

No, C is stuck in the Stone Age. C programmers can't comprehend the complexity of modern data structures. It would make their heads explode.
>>
>>60266962
Fortran
>>
>>60266974
go program your turing machine then
>>
Wow OP you're right. I'm now a Rust homosexual.
>>
>>60267038
Which language do you think the languages that implements those "complex data structures" are written in?
It's c dumbass
>>
File: akari bleh.jpg (43KB, 690x460px) Image search: [Google]
akari bleh.jpg
43KB, 690x460px
>>60266947
The reason Rust is being pushed so hard is because social justice warriors have found great difficulty penetrating the communities of open source system coders who use C and/or C++.

The "safety" features give advantages to lobotomised Feminist studies "coders" who are trying to "disrupt" these communities while breaking the knee caps of everyone else who knows what they are doing.

Literally nothing in Rust actually solves problems that haven't already been solved by RAII in C++ and even some GC/stack/heap techniques in the arguably superior but slower D compiler.

The advocates are all social justice warriors and this is their "long march through the development communities". They are employing critical theory against their main targets C and C++, by criticising everything it is and does and demonising its users. They've held back their "cis het white male" jargonism for now, but once they have established a foot hold "killer app", expect them to go wild with it. Just read through the big throbbing CoC they've erected on their main website.

Rust is kill. Don't touch it, spit on all its advocates.
>>
>>60267038
I'm serious tho, can anyone point me to commonly used data structures C library?
>>
>>60266947
>it's popularity is falling more than any other languages in the market.
Higher salaries, here i come!
>>
File: download (1).jpg (12KB, 222x227px) Image search: [Google]
download (1).jpg
12KB, 222x227px
>>60267120
Which is written in the machine language, the lowest level language. But it'll take forever to get things done the closer you get to the metal, so to speak. Your logic is flawed. It's like saying horse-drawn carts are superior because they're the ancestors of cars.

C is outdated and not suited for modern applications. You might be able to program your electronic arduino toys and drivers with them, but they don't have any use beyond that. C++ meets the demands of the modern world. C no longer does. It only fills a niche role now.
>>
>>60266996
The best language in existence, but no one cares.
>>
>>60267362
Why is it the best?
>>
>>60266947
>what is firmware
>what is embeded software
>what are operating system kernels
>what are hardware drivers
>what are low level system utilities
>why can't they be implemented in <insert latest meme OOP or scripting language here>
>why is <insert latest meme OOP or scripting language here> itself implemented in C
>>
>>60267426
Lightweight, faster than C, allows the use of essentially any programming paradigm.
>>
>>60266947
NSA/C shills incoming
>>
Fuck you OP, C is awesome!
>>
>>60267149
>>60267149
>>60267149
bump
>>
>>60266962

sepples
>>
>>60266947
you are acting like C is used everywhere for everything.

Obviously C++ is better for desktop applications, and there is a ton of other options for people with different backgrounds.
C is still used today because you don't change language in a project (unless you are a webdev, then you do it every two weeks)
>>
>>60266947
C is dying anyway. Either use C++ or git gud and learn Rust. Ignore the NSA shills. They'll adamantly oppose you for using safer programming language.

Their anti-shill patterns can be easily spotted, their most common strategy for 4chan users is to spread SJW boogeyman which has nothing to do with anything practical.

NSA spread the hatred towards free software with communism boogeyman
NSA spread the hatred towards Java with pajeet boogeyman
NSA spread the hatred towards firefox with the SJW boogeyman
Now it's rust, my two cents: when some one resorts to muh sjw/pajeet/communism as an argument you should know they've lost the argument
>>
>>60267750
t. mozilla shill
>>
>>60267147
Wow, thanks for opening my eyes, anon.
>>
>>60267803
t. NSA shill
>>
>>60267147

The best bit is when you're reading it and you think oh they're not that bad, a bit tightass but that's all. Then they refer you to the citizen code of conduct.
>>
>>60267898
>citizen code of conduct
what exactly is wrong with that?
>>
>>60267953

This is the first paragraph

1. Purpose

>A primary goal of COMMUNITY_NAME is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof).
>>
>>60267953

Software is a science. If something works and is innovative, that is immutable. The feelings of sensitive individuals is irrelevant to these things.
>>
>>60267953
These things always place people's feelings above technical merit and competence.
They also usually have a clause that says you have the duty to excommunicate anyone from your project if they hurt anyone's feelings for any reason, even if the altercation happened off-site, and had nothing to do with the project or your organization.
Easiest example, X developer is biggest contributor, but some tranny doesn't like his commentary on trans people he made on twitter.
This has happened in the past.
>>
>>60267970
>>60267983
>>60267999

b-but they only want people to be happy, and caring to their f-feelings is the way...
>>
>>60267999
>>60267983
Stop trying to argue with liberal arts fucktards, they'll bring up "emotional intelligence" or call you autistic for not caring about people's feelings.
Oh here's my favorite, "people are more important than software"
>>
>>60268012

The same way giving an alcoholic a beer is making him happy.
>>
File: hqdefault.jpg (32KB, 480x360px) Image search: [Google]
hqdefault.jpg
32KB, 480x360px
>>60267750
>Rust
>>
>>60266947
You are an absolute retard for unilaterally deciding what is and isn't a good language.

t. Embedded Software Engineer, C is still king for a lot of things
>>
Nice bait u fucking retard.
OS kernel - C
Drivers - C
Universe - you guessed it, C.
>>
>>60267750
Java is responsible for its own hate
>>
>>60267525
This so much.
Fuck python kids and fuck javascript mongrels.
>>
>C is a small language to grasp, exactly the kind of shit that makes things retard friendly.
Hence why I recommend it to beginners. Easy to understand, but still requires you to learn the basics of computer architecture. Also forces you to be able to implement many things yourself. If you freeze up because you can't implement something due to a lack of third party libraries for it, you don't deserve to call yourself a programmer. While it is certainly desirable to leverage libraries when you can, as it is better for productivity, you should never be wholly reliant on them.

Otherwise...

C++, Rust, and Ada all serve excellent roles as systems programming languages, or as general purpose programming languages when speed is desired. C++ is particularly preferred when one or more C libraries is necessary for the task.

C#, Java, and their kin (languages that run on their respective virtual machines) are useful as feature-complete general purpose languages that need a moderate amount of performance, but which can trade-off absolute performance for portability, or ease of development.

Ruby, Python, Node.js, and similar languages are useful as general purpose languages for small-scale programs, where performance is less relevant, or primarily I/O bound, as in the case of some webservers.

Other languages are primarily domain specific.

Use the right tool for the right job.
>>
>>60266947
>C is from stone age
>the people who still preach it is like overgrown toddlers
Also, what happened to your use of punctuation in the latter half of your OP, OP?
>>
>>60268095
Never have I seen Ada recommended outside of my company. Nice going anon.
>>
>>60267592
Probably glib. Though this
struct stuff {
char * x;
int *y;
struct stuff *next;
};

Is usually all that's needed. Though glib is pretty common if you need something more advanced like hashset or list.
>>
>>60268057
Case on point, this is what losing an argument looks like
>>
>>60267013
>>60267149

The library you want is called Klib. It's a header-only library that uses macros to generate code for various data structures. Its performance for hash tables is reasonable enough that some have used it in C++ over std::unordered_map (which, last I checked, is implemented poorly in gcc)

>>60268072

While it is true that the most commonly used OS kernels these days are written in C (due to being started in a time where C++ was not up to snuff), and likewise, the driver API is entirely in C as well, I would not necessarily consider them for a serious modern project. C++11 and up have their advantages that might be particularly useful in kernel-level code. Rust, similarly, has the same advantages, and already does have a decent open source kernel out in the form of Redox.

>>60268141

I had to use it as an introductory language when I first started my bachelor's. It's not the most pleasant language to use, but you can get used to it, and it does have a sufficient number of features necessary to make a good systems language. If I was writing code that could be responsible for someone's life or death, I might strongly consider it.
>>
>>60268189
>>60268173
thanks
>>
I have a joke, C users

What is a boolean?
>>
>>60267750
This
>>
>C doesn't have delegates
function pointers
>C doesn't have resizable arrays
realloc
>C doesn't have strings
C has arrays. A string is an array of type char.
>C doesn't have string concatenation
sprintf
>C doesn't have namespaces
You can force this yourself with macros, or just write structurally sound code that doesn't rely on multiple namespaces.
>C doesn't have exception handling
The assignment operator returns the result of the rvalue, you can use this for higher order conditional statements, which handle errors.
>C doesn't have closures in the standard
Mixing data and code was a mistake from the very beginning.
>C doesn't have unit tests
Write your own.
>C doesn't have Function overloading
Function overloading makes binary compatibility with other C compilers impossible because every compiler would have it's own method of function name mangling to make function overloading work.
>C doesn't have memory safety of any kind
>C doesn't prevent memory exploits and has no bounds and runtime checks
Write correct code and this isn't an issue.
>C doesn't support dynamic method loading/creating
Don't mix code and data please.
>C doesn't even have generics and templates
C11 has this, you've always been able to write macros. Anything overly complex should be a plain ass function, this is what callbacks are for.
>C doesn't have meta programming
The C preprocessor lets you do lots of convenient things and prevents autistic stuff like generating of code at build time.
>C doesn't have mixins
good
>C doesn't have higher order functions
There's nothing stopping you from writing your own.
>C doesn't have function literals
Do not mix data and code please.
>C doesn't have array slicing
Write it yourself, shitstain.
>C has a very limited support for implicit parallelism
Most of the standard library is thread safe, it's up to you to write thread safe code when writing software.
>C doesn't even have string switches
switch (!strcmp(...))
>>
>>60268254
>closures/lambdas are mixing data with code
i really wish i knew what it's like to be this brand of retarded
>>
>>60268254
keep going man, this is hilarious.
>>
>>60268254
>that damage control
>>
>>60268223
A miserable pile of bytes
>>
I'm doing an assignment in C at this very moment and I think I want to die.
>>
>>60266947
Most of these are false, but even so, that's what makes it good.
>>
>>60268223
same thing it has been since 1999 http://en.cppreference.com/w/c/language/arithmetic_types#Boolean_type
>>
Why the fuck is this thread still here?
>>
>>60268223
C doesn't have booleans
>>
>>60268287

a lambda is code that can be passed around like data, that's literally its definition
>>
File: PatrickShort-Circuit.jpg (12KB, 473x356px) Image search: [Google]
PatrickShort-Circuit.jpg
12KB, 473x356px
>>60268410
>passed around like data
alright, let me just casually serialize some of my fold arguments.
nigger do you even know how abstraction works
>>
>>60268287
Show us an example where a lambda makes something actually easier, where C needs workarounds.
>>
>>60268402
exactly

>>60268390
When you need to use a macro just for this, it's just stupid (+It's in C99, for something basic as this)
>>
>>60268485
Don't ignore the counter argument
>>60268349
A boolean still occupies at least a whole byte, might as well stop pretending and call a spade a spade.
>>
What about using Go instead?
>>
>>60268541
go has runtime, so it's not low bare metal level
>>
C is literally the best programming language. If you use anything else you are a cuck.
>>
>>60268462
>Show us an example where a fuel injector makes something actually easier, where my horse needs workarounds.
>>
>>60267149
glib
libapr
https://notabug.org/koz.ross/awesome-c
>>
>>60268610
Only losers use C.
>>
>>60268713
Cuck detected.
>>
>>60266980
What language is C*? Did you mean C#?
>>
I have a fulltime job where I write in C and assembly
OP(oo) is a fag!
>>
>>60268722
C stands for Cucks
>>
>>60268807
nice buzzword, retard
>>
>>60268254
/thread
>>
File: 222.png (429KB, 399x614px) Image search: [Google]
222.png
429KB, 399x614px
>>60268646
>>
File: images.jpg (11KB, 233x216px) Image search: [Google]
images.jpg
11KB, 233x216px
>>60268254
>Write everything yourself!
>Advanced features aren't needed!
>>
>>60266947
>C doesn't have delegates
Bloat.
>C doesn't have resizable arrays
Bloat.
>C doesn't have strings
Bloat.
>C doesn't have string concatenation
Bloat.
>C doesn't have namespaces
Bloat.
>C doesn't have exception handling
Bloat.
>C doesn't have closures in the standard
Bloat.
>C doesn't have unit tests
Bloat.
>C doesn't have Function overloading
Bloat.
>C doesn't have memory safety of any kind
Bloat.
>C doesn't prevent memory exploits and has no bounds and runtime checks
Bloat.
>C doesn't support dynamic method loading/creating
Bloat.
>C doesn't even have generics and templates
Bloat.
>C doesn't have meta programming
Bloat.
>C doesn't have mixins
Bloat.
>C doesn't have higher order functions
Bloat.
>C doesn't have contract programming
Bloat.
>C doesn't have inner classes
Bloat.
>C doesn't have function literals
Bloat.
>C doesn't have array slicing
Bloat.
>C has a very limited support for implicit parallelism
Bloat.
>C doesn't even have string switches
Bloat.

Speed is the only thing that matters.
>>
>>60268402

C has _Bool, which is typedef'd to bool in stdbool.h.

C has Booleans, just like C++.

>>60269146

Many of the things you're calling bloat don't really impact performance at all.
>>
>>60267147
And what about its actual features? Having a quick look on Wikipedia I can tell it's basically a thread-safe C.
>>
>>60269285
rust is for cucks
>>
>>60269395
C(uck) spotted
>>
File: 4L_qMl5Vr2q.gif (3KB, 452x523px) Image search: [Google]
4L_qMl5Vr2q.gif
3KB, 452x523px
>>60267750
>shills using our language
they are evolving
>>
>>60268189
>and already does have a decent open source kernel out in the form of Redox
Are you joking? That project deserves to be smeared out by Linus
>>
>>60268223
>C
>Booleans
>>
>>60269457
Why do you sound like a /v/ fucktard?
>>
>>60267750
OR
Idris.
But rust already has more, and significantly better, libraries than haskell so it has a leg up in that department.
>>
>C doesn't have resizable arrays
malloc
>C doesn't have strings
nul terminated char * is a string
>C doesn't have string concatenation
strcat
>C doesn't have namespaces
just add prefixes to your identifiers, which will effectively be a namespace
>C doesn't have exception handling
longjmp
>C doesn't have Function overloading
function overloading is not a good thing. it leads to harder to read code and more painful compile errors
>C doesn't have memory safety of any kind
This is necessary in some applications
>C doesn't prevent memory exploits and has no bounds and runtime checks
stack canaries, DEP and plenty of other runtime checks exist. Just because they're not in the C standard doesn't make them not an industry standard.
>C doesn't even have generics and templates
macros
>C doesn't have higher order functions
how is this not achieved with function pointers?
>C doesn't have function literals
syntactic sugar
>C doesn't have array slicing
pointer math
>C has a very limited support for implicit parallelism
the compiler is free to do whatever the fuck it wants, as long as the result is right. openmp, for example.
>C doesn't even have string switches
syntactic sugar
>>
>>60267013
I'm pretty sure there are, but because C doesn't have language-level generics it's usually better to implement your own if using non-standard data types.

>>60267089
C was created because FORTRAN was found inadequate for systems programming.

>>60267102
Turing machines are more powerful than any PC. We haven't built anything more powerful than a FSM yet.

>>60267022
>255 bytes of RAM
Pretty sure even the C90 standard library won't run on that.

>>60268223
Most processors can't address individual bits, so you instead pack multiple boolean variables into a single byte.
>>
>>60270884
It's true what they say, can't spell cuck without C.
>>
>>60267022
Rust is smaller than C as well as significantly more memory efficient.
>>
>>60269146

C compilers are only fast because they implement all those things you idiot
>>
>>60268095
>C++, Rust, and Ada all serve excellent roles as systems programming languages
C++ is a horrible mess as a language. It has all of the memory safety problems of C, with a ton of new fun ways to cause undefined behavior. If you use the STL to make it memory safe, it'll probably run slower than the equivalent code in Java.

Ada is a pretty cool language, except for the horrible syntax and required usage of Unchecked_Deallocation for some tasks. IMO, Ada 95 did OOP the best. The lack of a preprocessor in the standard is also bullshit.

Is rust actually in a usable state now? Can I write code in Rust that will still compile in 10 years? I certainly can in any standardizes language like C.
>>
>>60270957
go back to /pol/
>>
>>60268734
come back after you've googled wildcards.
>>
>>60270964
>Rust is smaller than C
>[citation needed]
I would imagine that Rust's mandatory bounds checking would add a few instructions here and there. Other than that, I doubt it'd make any difference.

>>60267022
You should probably be using assembly at that point.
>>
File: IMG_0021.jpg (1MB, 3264x2448px) Image search: [Google]
IMG_0021.jpg
1MB, 3264x2448px
>>60266947
>>
>>60271074
>brand new unopened copy
fuck off meme boy
>>
>>60267750
Only people Ive ever seen using "Anti-shill" in a serious manner are SJWs. Take that how you will.
>>
>>60271074
Lose weight, fat ass.
>>
>>60267525
/thread
>>
>>60271064
>>60270964
>>60270951
Nope, actually C works fine on such microcontroller
>>
>>60270957
KEK
>>
>>60270980
>Can I write code in Rust that will still compile in 10 years?
Each stable rust is 100% backwards compatible with the previous stable releases.
>>
That's good, I like a not having a bloated POS
>>
>>60270964
You rust shills will make up anything.
>>
What's an alternative? C++ is an overcomplicated mess. Go is garbage. Rust has barely any users. That said, C isn't going anywhere any time soon. Writing a major low level project in anything other than C/C++/C# basically means it's guaranteed to die or be abandoned incredibly quickly, especially in open source and free software.
>>
>>60272900
Exactly this, especially for embedded devices. If you're writing bloatware then higher level is just fine, but if your code has to fit in 2KB, C wins.

Also no one mentioned compiler bugs. C compilers have been known to host fewer bugs than C++ compilers. Maybe this is less an issue these days, idk.
>>
File: c.png (85KB, 745x888px) Image search: [Google]
c.png
85KB, 745x888px
>>60266947
>>
>>60270964
Go is smaller than Rust, though.
>>
>>60273377
>u dun need it bro
xd
>>
>>60266947

C projects:

>Windows
>Linux
>BSD
>iOS, Android and Windows Phone
>GNOME
>MySQL
>MS SQL
>PostgreSQL
>Apache Server
>NGinx Server
>Python
>Ruby
>Perl (interpreter)
>PHP Zend Engine
>Chicken Scheme
>Various 3D animation technologies
>Countless stuff in embedded sytems


..among others.

It's hands down the most important programming language in existance.
>>
>>60273522

Yeah, you really don't need it.

The internet and the bigegst operation systems run perfectly fine without it:
>>60273677
>>
File: theo.jpg (3KB, 200x198px) Image search: [Google]
theo.jpg
3KB, 200x198px
>tfw strlcpy still isn't standard in all OS

Thanks NSA.
>>
>>60266947
If you prefer JavaScript over C, use it. Let other people use what they like.
>>
>>60273758
>NSA
I like MI5
>>
>easier to rewrite everything in rust and golang rather than just make C sane with strlcpy/strlcat and migrate existing codebases to use it
>>
PhD Informatics student here, since the beginning of my studies on BSc level I used mostly C for almost everything I wrote and didn't really need to use another language. When I was an intern in HEP Physics research institute in the IT department I also could use Bash and C for most of the important things. I don't know why you make these threads OP, but you just can't prove that C is a bad language because for many years C already prove that it's an awesome language for many useful things. Your OS is also written in C. Find something new to shitpost about, seriously.
>>
>>60273816

So, let's rewrite 12 million lines of C code for the linux kernel linux.

LOC is a shit metric, but let's assume we can write 10 LOC per hour. So we have:
12,000,000 / 10 = 1,200,000 hours.

Let's assume people work 8 hours per day:
1,200,000 / 8 = 150,000 days.

Let's assume 1,000 people would actually rewrite the linux kernel at the same time (full time, that is!): 1,5000 days.

There are about 250 working days per year:
1,500 / 250 = 6

So it would take about 6 years fulltime work of 1000 people to rewrite the linux kernel as it is today.
>>
>>60274109
>10 LOC per hour
Shit nigz how slow do you type lol
>>
>>60274109

Are you a retard or autsmis by chance?
>>
>"Igor Nikolskiy says:
>March 19, 2015 at 4:22 pm
>I don't think C gets enough credit. Sure, C doesn't love you. C isn't
>about love - C is about thrills. C hangs around in the bad part of
>town. C knows all the gang signs. C has a motorcycle, and wears the
>leathers everywhere, and never wears a helmet, because that would mess
>up C's punked-out hair. C likes to give cops the finger and grin and
>speed away. Mention that you'd like something, and C will pretend to
>ignore you; the next day, C will bring you one, no questions asked, and
>toss it to you with a you-know-you-want-me smirk that makes your heart
>race. Where did C get it? "It fell off a truck", C says, putting away
>the boltcutters. You start to feel like C doesn't know the meaning of
>"private" or "protected": what C wants, C takes. This excites you. C
>knows how to get you anything but safety. C will give you anything but
>commitment.
>In the end, you'll leave C, not because you want something better, but
>because you can't handle the intensity. C says "I'm gonna live fast,
>die young, and leave a good-looking corpse", but you know that C can
>never die, not so long as C is still the fastest thing on the road".
>>
>>60266947
You are right, OP.
>>
File: 1482170812547.jpg (114KB, 350x420px) Image search: [Google]
1482170812547.jpg
114KB, 350x420px
>>60274208
Thanks.

Programming in C may be frustrating for me but now everytime I get a segfault the image of a punk badass rider crashing into a fucking wall at 200mph and exploding into gore will be stuck on my mind.
>>
>>60266962
nothing, C is the foundation for just about everything, OP is merely baiting
>>
C is Unix
Unix is C
>>
>>60268051
>"people are more important than software"

trannies aren't people
>>
>>60273758
>using strcpy, strcat, or any related functions
Stop being a stupid fag and use snprintf.
>>
>>60273418
Much larger, especially because >runtime
And in terms of memory efficiency, >gc >mc

>>60272495
>>60272225
>>60271064
(C)uck (C)uck (C)uck!
>>
>>60274154
That's roughly the average speed of a professional programmer. It has to do with the back and forth of trying something and then rewriting it because it was wrong along with peer review.
>>
>>60274154
There is a shit load more to writing programs than just shitting out code. You will be spending a significant amount of time doing other things.
>>
>>60275697
(C)orrection, it is you who got (C)ucked by the superior alpha language, You Cee
>>
>>60274208

Hahaha, thanks.

#include "stdio.h"

main() {
printf("We are the \033[1;32m1%\033[0m\n");
}
>>
>>60275582
Almost nothing is unix these days to be honest. Unix is far from sophisticated
>>
>>60273677
to be fair all those projects started long before Rust or D existed, so there was really not much choice


only thing that
>>
>>60276366

I was just trying to show how ridiculous OP's post is.

Nothing wrong with Rust.
>>
>>60268349
I kek'd
>>
>>60267525
Rust can do literally all of those things you listed.
>>
>>60277737

Can you give examples of firmware, embedded software, OS kernels, hardware drivers or low level system utilities written in Rust?
>>
>>60266947
It seems that people like you don't understand C.

C is a high level language that is close to assembler. Of course C isn't going to have all those features it is designed in such a way that it can provide the programmer with low level access to memory and basic functionality to write working programs.

C++ is an extension of C, even though C++ has more features that does not make C++ a superior programming language. Most of the features on C++ may be completely unnecessary to a programmer. It would be better off just using C to reduce unnecessary overheads. This is why C is used for embedded systems programming.
>>
>>60279576

>It would be better off just using C to reduce unnecessary overheads.
what is the zero overhead principle
>>
>>60278334
Not the same anon, and I dont like their sjw community but the rust people have produced a microkernel
https://en.wikipedia.org/wiki/Redox_%28operating_system%29
>>
>>60273758
didn't glibc implement it VERY recently or am i thinking of another openbsd function?
>>
File: 1492354613020.png (31KB, 744x520px) Image search: [Google]
1492354613020.png
31KB, 744x520px
>half the thread is copypasta
>>
>>60268223
A human construct useless in a programming language
>>
>>60268189
I work for a company that makes control systems for aircraft engines and it is Assembler + C for the start-up sequence, but then hands over to an all Ada OS.

The only C after that is being newly introduced this year. There is plans for more C, but not on the DAL A critical systems.
>>
>>60268362
University? Which one?
>>
File: hang.jpg (6KB, 263x192px) Image search: [Google]
hang.jpg
6KB, 263x192px
>>60266947
When will webdev and pajeets will learn ?
>>
>>60268362
Me too, but it's not that bad, it's an Operative Systems assignment, so threads, processes, pipes, shared memory, message queues and all this shit
>>
>>60275075
Pretty much, while C has a huge place in history and learning it allows beginners to familiarize themselves with high level programming languages without becoming overwhelmed it just doesn't have much practical use these days. Python, Java, HTML, these are the ones that are being used everywhere and should be the ones one should learn if they're going to pursue a code-related career.
>>
>>60273097
Well you still can't compile Linux without gcc
>>
>>60281905
>programming languages
>HTML
/g/ sure is getting shitty.
>>
>>60266962
Rust
>>
>>60266962
Rust.
There is nothing C can do that Rust can't do while being as fast or nearly as fast, way safer, having cleaner, more readable code etc.

>>60267013
There are but they are harder to use. Pick proper tool for given job, you don't want to build enterprise software in C.

>>60267142
False.

>>60268095
>C++ is particularly preferred when one or more C libraries is necessary for the task.
Rust has nice C library support as well.
>>
>>60266947
dont forget that if you dont use c99 or c11 standard then c doesnt even support bool or for loops. C DOESNT SUPPORT FUCKING FOR LOOPS.oh and c doesnt support strings either doesnt matter which standard you use.literally only retards would use this language.
>>
>>60282406
>using enums is hard
>>
>>60282406
Stop spreading FUD please.
>>
>>60266947
Please use Rust.
>>
File: 1493828660862.jpg (44KB, 639x448px) Image search: [Google]
1493828660862.jpg
44KB, 639x448px
>>60282421
when you wake up, do you take a shower,get your clothes on,walk down the street to find a buff guy and ask him to knock you out as strong as he can every morning?im only asking this because defending c, requires the same amount of masoichsm
>>
File: 1491019534012.jpg (12KB, 329x329px) Image search: [Google]
1491019534012.jpg
12KB, 329x329px
>>60282444
do you even know what c99 and c11 is?do you know what reading comprehension is?are you even over 18?
>>
>>60282523
That's from K&R, the defining document for C 89, mong.
>>
File: Screenshot (9).png (91KB, 1366x768px) Image search: [Google]
Screenshot (9).png
91KB, 1366x768px
>>60282556
have you tried reading into that chapter?the for loop in that book is not the for loop im talking about.pic related.
>>
File: Screenshot (10).png (92KB, 1366x768px) Image search: [Google]
Screenshot (10).png
92KB, 1366x768px
>>60282611
shit,i wanted to reply too fast and fucked up the syntax.heres a new screenshot.
>>
>>60282611
If your legs start hurting from the backpedalling, initialise it outside the loop and try again.
>>
>>60282611
>>60282639
isn't that saying that you can't declare variables from within the loop
>>
File: fuck off back to reddit.jpg (530KB, 1350x1464px) Image search: [Google]
fuck off back to reddit.jpg
530KB, 1350x1464px
>>60282444
>>
>>60282682
>replying from your phone because you got btfo
>>
>>60282663
it means c doesnt support boolean valuse or for loops if you are not using the c99 standard or the c11 standard.

error: 'for' loop initial declarations are only allowed in c99 or c11 mode
>>
>>60282493
Please use Rust.
>>
>>60282406
Last time I used C, you had to declare the index of for loop before using it
so for (int i=0; ; ){} would not work
>>
>>60282639
You must be new to C.
#include <stdio.h>
int main() {
int i;
for(i=0;i<100;i++)
printf("Hello World\n");

return 0;
}
>>
>>60282458
>>60282750
Please don't do that.
>>
>>60282774
what a fucking joke.
>>
File: Screenshot (11).png (92KB, 1366x768px) Image search: [Google]
Screenshot (11).png
92KB, 1366x768px
there are no strings either.c fags somehow going to defend this in the year of our lord 2017
>>
>>60282799
Strings are just char arrays, dummy.
>>
>>60282799
>gets BTFO
>completely changes the subject
>>
>>60282004
>having cleaner, more readable code etc

Pointers to everything makes just about everything possible and very readable in C.

I've built, and still build, high reliability software in C that runs and runs on systems with years of uptime relied upon by companies with billions in revenue.

I fucking swear everyone who pisses on C here is a sophomore in some average CS program who thinks every software engineering problem can be solved with Node.js.
>>
>>60282799
Get prepared for C apologists trying to defend this
>>60282817
chars are just ints, faggot. Why do you need chars?
>>
>>60282845
>koder pleb wanting his strings to take up 4 times as much space

sasuga web dev
>>
File: 1493853291072.jpg (103KB, 640x462px) Image search: [Google]
1493853291072.jpg
103KB, 640x462px
>>60282817
AND WHY THE FUCK WOULD YOU FUCK AROUND WITH FUCKING CHAR ARRAYS TAKING PRECIOUS HOURS THAT COULD HAVE GONE TO REAL DEVELOPMENT PLEASE FOR THE LOVE OF GOD YOU JUST CANT BE THAT RETARDED.YOU CANT.I REFUSE TO BELIEVE IT.
>>
Who let these retards in?
>>
>>60282864
Enjoy your bloated type system, C tard
>>
>>60282876
C doesn't even have booleans
>>
Don't give him any more (You)s
>>
>>60282899
#include <string.h>
>>60282913
#include <stdbool.h>

>Please use Rust
>>
>>60282799
char *OP = "Faggot";
printf("%s", OP);

That was fucking hard to do.

I don't even like C.
>>
>>60282940
I can do it too,
import *

>please use python
>>
File: 1492025197135.jpg (26KB, 495x495px) Image search: [Google]
1492025197135.jpg
26KB, 495x495px
>>60282940
string.h dont give you the ability to use strings and stdbool only works with compilers that support c99 or c11
>>
>>60282969
again stdbool is literally just an enum or sometimes macros
>>
>>60282876
Not a programmer, but:
Isn't this just a point of different languages for difffent objectives? For embedded systems and shit where you need absolute control, wouldn't C be the better choice than python or whatever? Why complain about how Latin isn't English?
>>
File: 1453300284308.jpg (13KB, 259x194px) Image search: [Google]
1453300284308.jpg
13KB, 259x194px
>>60282969
>please use rust
>>
>2017
>C

You have been asked to print the sum of two numbers.

Normal people:
void print_sum(T)(T x, T y)
{
writeln(x + y);
}


Mentally ill C tards:
void print_sum_ints(int x, int y)
{
printf("%i", x + y);
}

void print_sum_floats(float x, float y)
{
printf("%f", x + y);
}

void print_sum_float_int(float x, int y)
{
printf("%f", x + y);
}

void print_sum_int_float(int x, float y)
{
printf("%f", x + y);
}
>>
>>60283083
You know what they say, can't spell cuck without C
>>
File: 1349448608921.jpg (9KB, 200x171px) Image search: [Google]
1349448608921.jpg
9KB, 200x171px
>mfw people raging on C never wrote anything in this language
>>
>>60283050
my problem is that you can do literally everything that c can with c++ much easier and also c being different doesnt justify its abhorrently retarded design.
>>
>>60283083
C doesn't have templates? What year is it now?
>>
>>60283119
So then am I stupid for learning C? I was told it is like learning to drive stick before automatic. Harder, but makes you a better driver. I wanted to gain a stronger understanding of programming. I tried a bit of C++, but it's such a vast language, C appealed to me because it's so basic.
>>
>>60283119
at the same time you pull in a bunch of bloat that makes it harder for the compiler to optimzie your shitty code, and drag in a bunch of libraries that add bloat, and quickly kill all compatibility with other compilers
>>
the question is not what c doesnt have,its what even c has?if they hate features and safety this much why dont they just write their embedded shit in assembly anyway?
>>
>>60283144
if its a hobby for you just learn c#.it has modern features,safety very easy to learn,many things you learned from c carries over and you can make programs with GUI very easily.

>inb4 pajeet
>>
>>60283083
python pleb here, is this true? Can anyone give me an honest explanation to this?
>>
>>60283144
You can code in your favorite subset of C++. Only autists think you have to learn EVERYTHING and use EVERYTHING.
>>
>>60283222
>honest explanation
C doesn't have generics, what's there to explain? C is suck in the 70's
>>
>>60283083
Explain to me why you need a wrapper for this at all?
Why don't you use printf directly?
>>
>>60283297
>taking the example literally
Indeed, you fail to see the bigger picture
>>
>>60283297

>What is a contrived example
>>
>>60283310
>>60283312
Write me a real example or fuck off.
>>
>>60283318
You really got upset pretty quick, haven't you
>>
>>60283261

> C doesn't have generics

Doesn't need them. You could have a function generic_sum that is passed a couple of pointers and a flag to indicate the type of operation. You write this function one time and save it in your repertoire of libraries that needn't be written again. You could create a whole math library that not only does exactly what you need, but with observable memory usage.
>>
>>60282838
I didn't said that C has to be unsafe and unreliable.
You surely can archive that, but it takes more time and it's way easier to make a mistakes. Sole lack good RAII makes it way more vulnerable to many kinds of hard-to-find runtime bugs.
Of course you can avoid many of them using good techniques and various libraries, but even this can be really tiresome without tools like Cargo.

I'm not saying C is shit, it was nice and all, but now we have tools that can do same work better in every way. (token macros, generics, UTF-8, structural enums, patterns, networking, threading, etc.)
>>
>>60266947

Features are bloated if you need them make your own and use them. C has perfect encapsulation and lower level control. That is what it is for.
>>
>>60283381
Why not just implement virtual tables using pointers and garbage collector by redefining malloc and go full Java?
>>
>>60266947
>i don't like it so nobody should use it
>>
good luck writing a programming language without using C then OP :^)
>>
>>60283503
What do you mean, honey?
>>
>>60283535
give me a programming language that uses absolutely zero C
>>
>>60283557
Pascal
>>
>>60283557
c#
java
c++(clang compiler and debugger + tools for example)

basically every non-meme language out there.
>>
>>60283557
FORTRAN
>>
>>60283557
B
>>
>>60267089
We're already on 4chan anon

:^)
>>
>>60283582
all contain C i'm afraid
>>
>>60283557
Programming languages are written in the language itself.
>>
>>60283557
some implementations of common lisp
>>
>>60283211
>>60283252
Thanks guys
>>
>>60283675
Rust fag here, if you should not listen to >60283252, your fellow project members will use different paradigm/dialect of C++ and you will get confused
>>
File: Screenshot (12).png (225KB, 1366x768px) Image search: [Google]
Screenshot (12).png
225KB, 1366x768px
>>60283609
no they arent.the original c# and java compilers were all written in fully c++ including the roslyn compiler.much of those are rewritten in their own language but they still have some c++ party.absolutely no (0%) c.
as for c++ pic related.
>>
File: 1491574338514.png (181KB, 400x400px) Image search: [Google]
1491574338514.png
181KB, 400x400px
>>60283718
why dont we just kill c already then?why the fuck do we have to keep this fucking abomination of a language alive?
>>
>>60283831
People will switch to C when you introduce a real alternative.

There are none, nor will there ever be one.
>>
>>60283557
Rust?
>>
>>60266962
D
>>
File: main.png (134KB, 362x465px) Image search: [Google]
main.png
134KB, 362x465px
Cloud is a disservice to intelligent smashers. It has almost 0 downsides so that even the most braindead of smash players can use it to be a pain in the ass to deal with. Since Cloud is such a braindead character, it's popularity is skyrocketting more than any other DLC in the sm4sh. Because of this every tournament boils down to who can spit out their memorized button combination the fastest and the most consistently.
Cloud is cancer and it should die ASAP. Cloud players are actually retards in general. Cloud is a dumb character to grasp, exactly the kind of shit that makes things retard friendly.
C has no advanced tech like Sheik does.

But as a newfag you are kinda in the right direction. Cloud is for scrubs. Think of it this way:
During ancient times, having a deep and accurate understanding of the neutral game was a big deal and every honest Ganondorf player was considered to be good.

Fast forward to the last DLC wave, players just care about their flowchart combos and safe on shield spammable aerials. Now scrubs appreciate the vast "knowledge" of their braindead combos while matured brains are busy with sharpening their neutral game skills.

Cloud is from a stone age pixel vomit playstation game and the people who still use it like the overgrown toddlers they are that can't learn the neutral game and play him just because he's high-tier. Cloud is for lesser players.
Cloud has very fast, safe spammable, with high range aerials
Cloud has 17 auto-cancel frames on his dair and fair
Cloud has very fast dtilt
Cloud's dair's hitbox lasts a whole second
Cloud has very fast tilts with intangibility frames on his dtilt
Cloud dsmash comes out very quickly and has a huge range
Cloud can cancel a limit charge immediately making it safe even in neutral
Cloud's limit can charge when dealing and taking damage
Cloud has 4 versatile limit-broken specials
Cloud in limit charged mode become faster and it's easier for him to pressure

Cloud is a cancer that plagues the game.
>>
>>60284783
>>>/v/
>>
>>60274154
spoken like a true node.js pajeet
>>
>>60283083
C rekt
>>
>>60283083
Save me, macros!

#define print_sum(x,y) printf("%f",(float)((x)+(y)))
>>
>>60285426
>float conversion
I'm sorry you didn't pass
>>
>>60285426
I don't think you get it
and I don't even code
>>
>>60285718
I do, I'm just trying to conjure up a neat solution to it.

Our fellow Anon was pointing out that C doesn't have overloaded functions nor does it have dynamic data types.
Using a macro gets around the data types problem.
The overloading bit I had to fudge and convert both to floats, as C doesn't have type introspection either.
>>
This is what CALLBACK functions are for, you dumb fucks.
>>
>>60266962
Lua
>>
>>60285858
I'm a dumb fuck. Please save me from my stupidity.
Where are callback functions supposed to be applied?
>>
>>60285933
If you want to write generic stuff in C, you make your library function take a callback function so that types become the user's problem and not the libraries.

C even gives you a generic pointer type that works with ALL types, be it float or a giant opaque struct pointer type.
Go read man 3 qsort
>>
File: untitled_.png (7KB, 482x218px) Image search: [Google]
untitled_.png
7KB, 482x218px
>>60282406
>C DOESNT SUPPORT FUCKING FOR LOOPS

You are mentally retarded and should make use of you constitutional right to remain silent.
>>
File: 1424592472551.png (35KB, 625x626px) Image search: [Google]
1424592472551.png
35KB, 625x626px
>>60266947
Claiming that learning / understanding C is a waste of time because you have newer more automated languages is like claiming that learning basic algebra is a waste of time because you have a calculator. The biggest fault in your assertion is that you can make advancements without this lower level of understanding. Sure, you can develop new and useful stuff, but so long as those newer more convenient languages, their compilers (and through them, the programmer) still leverage the underlying system and it's libraries which are written in lower level language, you're ultimately limited by them; where your understanding stops. This also applies to the actual hardware you're using too, much of which C has adopted it's mannerisms from (this used to be more important; eg memory segment boundaries impacting performance and making sure compilers are aware of such quirks).
>>
>>60276074
Not portable code (at least not in the way intended). ANSI escape sequences aren't supported out of the box everywhere.
>>
>nu /g/ is filled with rust shills
>>
>>60286296
le epic oldfag is mad hehehehe
>>
>>60267147
Fucking this.
>>
>>60286360
Really? That? That is your argument?
Sad!
>>
#include <stdio.h>
int main()
{
printf("(You)");
}
>>
>>60270884
>syntactic sugar
>tfw enter key is just syntactic sugar for ^J (or ^M), who needs it
>tfw backspace key is just syntactic sugar for ^H, who needs it
>tfw delete key is just syntactic sugar for ^? (or ^D), who needs it
>tfw tab key is just syntactic sugar for ^I, who needs it
>tfw escape key is just syntactic sugar for ^[, who needs it
>tfw alt key used to be just syntactic sugar for esc esc (i.e. ^[^[), who needs it)
>>
>>60283119
>c being different doesnt justify its abhorrently retarded design
C is simple and pure

This drives autists nuts and provides me with my daily entertainment reading these screech threads

>>60283144
Learn a bit of assembly and C will start making perfect sense. It's basically 'portable assembly'.

C++ is easier to get work done with but don't try to learn all of it. Like Mandarin or English, you'll never know everything but you'll master the subset you need in a reasonable time.
>>
>>60287526
>C is simple and pure
..trash
>>
>>60287526
>Learn a bit of assembly and C will start making perfect sense. It's basically 'portable assembly'.
i like C but i think this applies more to forth
>>
#60266947
>Awful tier bait thread
>253 replies
Man this place sucks.
>>
>>60283557
JavaScript
HTML
>>
>>60287673
I wasn't talking about syntax, instead think about how pretty much everything maps directly to some asm instruction or simple construct (loops, branches, function calls)

It's far easier to read but mostly trivial to translate into asm or machine code.

forth looks interesting but also spooky and weird desu

>>60287732
yeah nah the daily language autism threads are the only entertaining thing on this board
>>
>>60285877
>written in ansi C
>>
>>60267147
I thought you were kidding until I went to their site and read the code of conduct. Fucking dropped and thanks
>>
>>60287761
Neither qualify as "programming language", one is a scripting language, the other even less than that, namely just a markup language.
>>
The nucucks in this thread shitting on C are like someone living in the attic and clamoring about the fundament and basement supposedly being useless and in need of being removed.
>>
>>60288121
>their code of conduct
Care to post a quick tl;dr of that?
>>
>>60267525
This. For some reason most plebs on this board are stuck with the thought that literally all you do with a programming language is code fucking mobile games and high level shit.
>>
>>60287526
>C is simple and pure

It's good for simpletons.
>>
>>60289764
High level is good. Low level is for lowlifes.
>>
File: Screenshot_2017-05-09_09-07-28.png (18KB, 802x136px) Image search: [Google]
Screenshot_2017-05-09_09-07-28.png
18KB, 802x136px
>>60289752
>>
>>60289816
0/10 bait, kill yourself.
>>
>>60279679

I don't think so, Glibc has always be a faggoty project. I remember the libc5 fork because of the faggoty glibc cucks.

https://sourceware.org/glibc/wiki/FAQ#Why_no_strlcpy_.2BAC8_strlcat.3F

It looks like they're still trying to justify rejecting the strlcat patch in 2000 which is a shame because we could have had 17 years of widespread strlcat by now. Instead we've got a pie in the sky and a whole lot of holes.
>>
>>60289825

>tfw my gender identity caused a buffer overrun in a form
>>
>>60289825
D r o p p e d like a fucking stone
>>
>>60271064
As someone who works with Micros, there's surprisingly little difference between C and Assembly. Once you've maxed it out, then optimised the C, if then it's still too big or slow ASM is probably the answer, but only if you really know what the fuck you're doing.
>>
>>60290343

C was always pretty much a platform agnostic macro-assembler.
>>
C#, and more importantly, it's documentation are cancer.
C++ is an inconsistent language.
C is the way to go, lads. Also I cum on myself when I write a program with efficient memory usage. Garbage collection is bloat!!!
>>
>>60289825
SO TOLERANT

That's exactly what I want in a language, a psychopath's political ideology.

Rust is a fucking safe space.
>>
>>60283083
>not variadic
pleb
>>
>>60290432
>Rust is a fucking safe space.
What does this even mean?
>>
>>60267621
And just how do you plan to implement the c++stdlib to use c++ in a system level context?
>>
>>60290554
>Adding two numbers
>Needs variadic functions
>>
>>60266947
Except that computers still work in the exact same way they did in the 80s
>>
>>60290870
>>adding two numbers
>>>>>>needs a god damned FUNCTION
>>
>>60267147
holy shit
>>
>>60290879
Distilled answer here.
>>
>>60279653
>a microkernel
Is that 1/1000 of a kernel?
It sounds like they still have some ways to go...
>>
>>60290960
>>a microkernel
>Is that 1/1000 of a kernel?
Please leave /g/ and never come back.
>>
>>60283144
You could get a better understanding of pointers and such than most dopes starting with a higher level language.
>>
>>60268095
>Hence why I recommend it to beginners.
Are you qualified do do this? If not then who do you think you are?
>>
>>60291536

This is an anonymous image board, you socially underprivileged waste of chromosomes.

I have 16 degrees form different universities, prove me wrong, retard.
>>
>>60267147

Perhaps there could be a new language design called pol, where all the keywords are trigger language.

#genocide <jewgolds.h>

kill faggot(AIDS)
niggerpubes
whitepower("fuck off we're full, world\n");
niggerpubes
>>
>>60290960
b r u h
>>
>>60290960
A thousandth of a thousandth
They call them microns
>>
delegates are a disgrace
namespaces::are::shit
exception handling is a fucking mistake
unit tests are ancillary to the language
function overloading should not be
generics are not very useful
templates are a hideous disservice
mixins are not useful
contract programming is a meme
classes are a mistake
function literals lead to code like nodejs
C++ must die
>>
>>60291884
Are all C programmers this delusional, or it's just vocal minority?
>>
>>60267750
C++ is dying faster than anything else.
>>
>>60291892
learn english, you nigger ape
>>
>>60290886
>Taking the example literally
Brainlet C tard kys no joke
>>
>>60290432
>HURR DURR NOT EDGY ENOUGH FOR ME XDDDDDDDDDDDDDDDDDDDDD
>>
>>60291907
Wow, this has to be some serious disability.
>>
>>60291884
>>60291907

Spotted the false flag Rustaceans..
>>
>>60290886
A "function" for this is already implemented by the compiler, and it is represented by the binary + operator.
>>
>>60291632
A preprocessor directive is not a keyword (technically the preprocessor isn't even part of the core language itself) and neither is a header file basename.
>>
File: 1494276716858.jpg (592KB, 3702x2198px) Image search: [Google]
1494276716858.jpg
592KB, 3702x2198px
>>60291884
>generics are not very useful
>>
>>60292086
here's how you do it without nerics:

printf("%d\n", x+y);

whoa

much rather generics than templates, though
>>
>>60292115
>printf("%d\n", x+y);
what's your function prototype?
>>
When are delegates and mixins useful?

Why do sepples/C#/rust programmers think it's reasonable to raise a (usually unhandled) exception in non-exceptional circumstances like an optional file being missing?
>>
>>60292130
just call printf you fucking bender. not everything needs a grand formal introduction, a class, and sundry boilerplate
>>
>>60292133
>delegates
Reaction to events
>>
>>60292146
You fucking dumb autistic brainlet lump of shit, did you really take that example literally? Do you have the concept of contrived examples?
>>
>>60292133
>rust
>raise a exception
Are you retarded or only pretending?
>>
>>60292154
Anything a switch or function pointers just can't deal with? Examples.

>>60292174
What's your function prototype?

>>60292187
Rust, being a combination of D and Standard ML, has exceptions. Of course it does.
>>
>>60292206
>What's your function prototype?
see >>60283083
>>
>>60292210
So return to just call printf.
>>
>>60292206
>Rust, being a combination of D and Standard ML, has exceptions. Of course it does.
Rust doesn't have exceptions, retard.
>>
>>60292234
Jesus christ some people pretend to be dumb
>>
>>60292206
https://en.wikipedia.org/wiki/Function_prototype
>>
>>60292242
It has error handling
>>
>>60292267
Every language except maybe XML and SQL has some kind of error handling. They would be useless otherwise.

Not every error handling uses exceptions. Exceptions are dangerous, slow and heavy. Result<T> is not.
>>
>>60292206
C# doesn't allow pointers unless in unsafe block.
>>
>>60269196
>don't really

So they still do, and every possible gain of performance, as small as it is, must exists. So everything is literally useless bloat
>>
>>60292242
what is catch

>>60292250
not an argument

you bring up a contrivance, then get mad when i point out its absurdity

i have found that generics are only useful in matrix and vector libraries. i can live without

>>60292350
did i mention C# you fucking faggot?
>>
>>60292379
>what is catch
Something Rust doesn't have.
https://doc.rust-lang.org/grammar.html#keywords
>>
>>60292401
i have not touched rust since the very early days, when it still has go-like syntax for concurrency
>>
>>60292462
Now, Rust is closer to C than Go.
It has no exceptions, no coroutines and uses regular threads + mutex + channels + RAII smart pointers for concurrency. Errors are handled by returning Option<T> enum(or rather tagged union in C) similar to Java 8's Optional<T> or https://doc.rust-lang.org/core/result/enum.Result.html if you want to provide additional error structure in case of a failure.

Coroutines in Rust would be nice though, but I don't see many usecases for it to be honest.
>>
>>60292115
%d expects an integer, if x or y are not of integral type you've got undefined behavior (what will most likely happen is that the bit pattern at the address of "x+y" expression's value, which is of type double if x or y are of floating-point type, is going to be parsed as if it were an int, and obviously a garbage result will be printed - but, of course, the standard doesn't guarantee what will happen if this is not guarded against).
>>
>>60292866
does it have green threads anymore? a good thing about go is that you can start a million goroutines if you need, and you won't run into OS limits. if a language has that as well as channels and channel alternation, you have arguably the most easy, flexible and powerful explicit concurrency model

as for Option and Result, they don't seem to add anything of value. the err != nil idiom gets shat on a lot, but things like Result and haskell's Maybe monad seem like mild syntactic poisons that are more notionally and syntactically complex than the idiom they replace

>>60292961
x and y are only ever of one type in the scope they are declared

you're being silly
>>
>>60292146
Show me your result for
printf("%d\n", 4.4735345345342f + 7.45453454533f);
, you mongrel.
>>
>>60293012
>x and y are only ever of one type in the scope they are declared
And a %d specifier works with any type?
>>
>>60293052
why are you passing floating point literals to printf("%d"?

>>60293073
if x and y are ints, and you sum them, you aren't summing Not Ints
>>
>>60293012
>does it have green threads anymore? a good thing about go is that you can start a million goroutines if you need, and you won't run into OS limits. if a language has that as well as channels and channel alternation, you have arguably the most easy, flexible and powerful explicit concurrency model
Yeah, it's a shame. You still can solve similar problems using MIO and node.js's like event-driven programming, but I personally hate it. Maybe we will have them back at some point. Still, I've made some multithreading programs and never had to use many threads. Thread pools + two channels always worked for me.

>as for Option and Result, they don't seem to add anything of value. the err != nil idiom gets shat on a lot, but things like Result and haskell's Maybe monad seem like mild syntactic poisons that are more notionally and syntactically complex than the idiom they replace
They allows you to avoid using exceptions while not having to do err != nil like in go. Rust's Result and Option are way more comfortable to use than go's error handling. You don't really use monad unless you want to chain and map these results or something. Normally you just use .unwrap() to unwrap Ok or panic on Err, unwrap_or(default) .unwrap_or_else(lambda) or use try!(...) macro that unwraps Ok or returns Err wrapped in some Result.
>>
>>60291884
Fucking this
I hate goddamn javacripple so much
Thread posts: 334
Thread images: 36


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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 content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.