Jump to content

How to Pick a Programming Language

straight_stewie
7 hours ago, patrickjp93 said:

No you're not. C is anti-brevity. Anything you can write in C I can write in C++ in the same or a smaller line count, usually smaller.

I think I covered this complaint in the OP. It went something similar to this: "If you want to solve complex problems while learning how computers work choose C." And then, "If you want to solve complex problems or work in a team, choose C++ or C#".

The salient point is that C is a viable alternative to Assembly (or Assembler, whichever you prefer) for learning the basics of how computers work under the hood. On the flip side, object orientation can get pretty far away from some of the elbow deep stuff about why things are done the way they are.

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

18 hours ago, patrickjp93 said:

No you're not. C is anti-brevity. Anything you can write in C I can write in C++ in the same or a smaller line count, usually smaller.

If C++ is so good why doesn't every company control c control v into a C++ compiler?

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, fpo said:

control c control v into a C++ compiler?

I don't understand this statement.

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, straight_stewie said:

I don't understand this statement.

Copy all the C code, paste it into a C++ document.
 

 

Link to comment
Share on other sites

Link to post
Share on other sites

18 hours ago, patrickjp93 said:

C is anti-brevity. Anything you can write in C I can write in C++ in the same or a smaller line count, usually smaller.

Except in situations where the environment is extremely restrictive such as specific embedded implementations or inter-op layering due to the namespace mangling.

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, fpo said:

If C++ is so good why doesn't every company control c control v into a C++ compiler?

Mostly because they're already using a compiler that does both C and C++. GCC, Clang, ICC, PGI, and MSVC all do both languages. And if you're using an IDE instead of a rich text editor, they just automatically call whichever compiler is installed on your system.

 

3 hours ago, Nuluvius said:

Except in situations where the environment is extremely restrictive such as specific embedded implementations or inter-op layering due to the namespace mangling.

I still can. Watch the embedded C++ videos from CPPCon 2016. C can be retired from embedded too.

Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to comment
Share on other sites

Link to post
Share on other sites

46 minutes ago, patrickjp93 said:

I still can. Watch the embedded C++ videos from CPPCon 2016. C can be retired from embedded too.

Then you clearly have absolutely no idea of what you are talking about because in some situations you don't have the space (memory and/or storage) for the full features of C++ and must resort to C or at best a cut down subset of C++ features.

 

Perhaps you should get some experience in that part of the industry before you try to comment on it.

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Nuluvius said:

Then you clearly have absolutely no idea of what you are talking about because in some situations you don't have the space (memory and/or storage) for the full features of C++ and must resort to C or at best a cut down subset of C++ features.

 

Perhaps you should get some experience in that part of the industry before you try to comment on it.

You're wrong. Bjarne Stroustrup even proved it with an embedded flight control program. If you know the language and the compiler switches you can use the full features just fine in a measly 512MB of space, even less, not that you ever use every feature in any single program. There's also Jason Turner's Commodore 64 games made in C++. Rich Code For Tiny Computers. C++ can in fact beat C at being memory-efficient.

Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, patrickjp93 said:

You're wrong. Bjarne Stroustrup even proved it with an embedded flight control program. If you know the language and the compiler switches you can use the full features just fine in a measly 512MB of space, even less, not that you ever use every feature in any single program. There's also Jason Turner's Commodore 64 games made in C++. Rich Code For Tiny Computers. C++ can in fact beat C at being memory-efficient.

The only real programmers write in machine code.

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, straight_stewie said:

The only real programmers write in machine code.

If we had all the time in the world, sure!

 

C/C++ exist to be that bridge between productivity and absolute control. Yes, you will have to hand-optimize some things. Compilers will never be perfect, but this idea that C is the only reasonable embedded language is ridiculous. It has been since C++11, and 14&17 have made the two equally flexible, tiny, and fast. Lightweight Exceptions, the flat standard library, and modules have removed both the build and runtime cruft C++ used to get a bad rap for. You can have the whole cake and eat it too if you know the language and your tools.

Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, SteveGrabowski0 said:

I thought everyone knew the story of Mel. Maybe I'm just old. xD

So basically, Mel likes reflection?

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

16 hours ago, patrickjp93 said:

You're wrong.

Sure... I've only been doing it for years now but hey what would I possibly know about it 9_9

13 hours ago, patrickjp93 said:

this idea that C is the only reasonable embedded language is ridiculous.

I'm not saying that this is the case at all. I'm talking specifically about embedded in the purest sense; when one is working directly with the hardware such as is the case with real time embedded firmware for instance, the sort of systems that must be extremely failure resistant. In many of these situations it's necessary to avoid using the heap and instead statically allocate therefore the STL gets dumped. In such a case the simplicity of procedural C simply makes much more sense; pragmatically why would you drag unnecessary guff in when it has no added benefit whatsoever just for the sake of having it - that's completely ludicrous, you don't have the space or resources for that. Another very important objective when working at this level is that you often want to make things as simplistic and un-convoluted as possible for debugging which can be a difficult task, therefore anything that is not absolutely necessary should be removed. Sure C++ is great at the embedded applications layer - there's a considerable difference between these two layers which you don't seem to understand or appreciate.

On 28/12/2016 at 11:44 PM, patrickjp93 said:

Anything you can write in C I can write in C++

I don't like repeating myself but I will since you seem to have either ignored or missed the point; you have to use C to get around name mangling for inter-op.

 

It's all about selecting the right tool for the right job and to be perfectly honest I find your comment to be quite pretentious:

13 hours ago, patrickjp93 said:

if you know the language and your tools

You clearly don't yet fully understand your languages, tools and their use cases!

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

6 hours ago, Nuluvius said:

Sure... I've only been doing it for years now but hey what would I possibly know about it 9_9

I'm not saying that this is the case at all. I'm talking specifically about embedded in the purest sense; when one is working directly with the hardware such as is the case with real time embedded firmware for instance, the sort of systems that must be extremely failure resistant. In many of these situations it's necessary to avoid using the heap and instead statically allocate therefore the STL gets dumped. In such a case the simplicity of procedural C simply makes much more sense; pragmatically why would you drag unnecessary guff in when it has no added benefit whatsoever just for the sake of having it - that's completely ludicrous, you don't have the space or resources for that. Another very important objective when working at this level is that you often want to make things as simplistic and un-convoluted as possible for debugging which can be a difficult task, therefore anything that is not absolutely necessary should be removed. Sure C++ is great at the embedded applications layer - there's a considerable difference between these two layers which you don't seem to understand or appreciate.

I don't like repeating myself but I will since you seem to have either ignored or missed the point; you have to use C to get around name mangling for inter-op.

 

It's all about selecting the right tool for the right job and to be perfectly honest I find your comment to be quite pretentious:

You clearly don't yet fully understand your languages, tools and their use cases!

No, you just use the statically allocated version. There's a compiler flag for that.

 

Because the abstractions can reduce the code base size without increasing the executable size one iota.

 

Again, C++ is proven superior for that

 

No, no you don't. And to prove it, here's one of the very best young minds in the business proving it live.

 

No one ever fully does. Your retaliation is far more pretentious than mine. Your knowledge has grown stale. Get over it.

 

Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, patrickjp93 said:

Again, C++ is proven superior for that

You have completely disregarding all of the points that I have made...

5 minutes ago, patrickjp93 said:

No one ever fully does. Your retaliation is far more pretentious than mine. Your knowledge has grown stale. Get over it.

Children simply won't be told. Go tell that to your boss/mentor if you ever make it into industry and see just where it gets you xD

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Nuluvius said:

You have completely disregarding all of the points that I have made...

Children simply won't be told. Go tell that to your boss/mentor if you ever make it into industry and see just where it gets you xD

Already done it and already beaten IBM at fixing one of their own hosted solutions for us. I've proven I know what I say I know. That's why I get more freedom than my other first-year colleagues.

 

And no, I bolded and underlined your points and addressed them individually. You are stuck in a mindset that is no longer the only valid one. C++ is perfectly viable for an embedded controller or system. Seriously, watch the video. There is a statically allocated standard library, the debugging tools for C++ have long since surpassed C's (hence why Google no longer has a single line of C in any of its code bases), and you don't need C to deal with namespace mangling as that presentation at cppcon demonstrates.

 

 

Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to comment
Share on other sites

Link to post
Share on other sites

27 minutes ago, patrickjp93 said:

I've proven I know what I say I know. That's why I get more freedom than my other first-year colleagues.

Yes yes very nice, so have we all... I am sure...

27 minutes ago, patrickjp93 said:

And no, I bolded and underlined your points and addressed them individually.

I still think that you are missing the point somewhat and...

27 minutes ago, patrickjp93 said:

You are stuck in a mindset that is no longer the only valid one.

...assuming that I am stuck with or in anything is quite an obnoxious overture on your part.

27 minutes ago, patrickjp93 said:

C++ is perfectly viable for an embedded controller or system. Seriously, watch the video. There is a statically allocated standard library, the debugging tools for C++ have long since surpassed C's (hence why Google no longer has a single line of C in any of its code bases), and you don't need C to deal with namespace mangling as that presentation at cppcon demonstrates.

To be courteous I will investigate what you have said and the material that you have linked when I have the time for it. I will admit that I have been focused elsewhere for the time being due to concerns in other areas of the industry thus I have not stayed on the edge of progress in this particular area.

 

Bear in mind however that, as you have already drawn highlight to by calling it stagnant, this has been the accepted methodology for decades so far. It's extremely well entrenched in culture as well as developer mindset... It's somewhat akin to suggesting that the sky is falling. I on the other hand embrace change and will encourage it (evangelically) if it is to be beneficial.

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Nuluvius said:

Yes yes very nice, so have we all... I am sure...

I still think that you are missing the point somewhat and...

...assuming that I am stuck with or in anything is quite an obnoxious overture on your part.

To be courteous I will investigate what you have said and the material that you have linked when I have the time for it. I will admit that I have been focused elsewhere for the time being due to concerns in other areas of the industry thus I have not stayed on the edge of progress in this particular area.

 

Bear in mind however that, as you have already drawn highlight to by calling it stagnant, this has been the accepted methodology for decades so far. It's going to be extremely well entrenched in culture as well as developer mindset... It's somewhat akin to suggesting that the sky is falling. I on the other hand react to change and will encourage it (evangelically) if it is to be beneficial.

It's not an obnoxious overture. It's beating a point into someone's thick skull. I'm equally pig-headed when it comes to music, so trust me I understand and sympathize with you. I work for a bank. Getting banks to change technologies is far harder than convincing you, but I succeeded at the former.

 

And hence I'll leave you with these as well.

 

 

Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, patrickjp93 said:

It's not an obnoxious overture. It's beating a point into someone's thick skull.

How dare you... xD

2 minutes ago, patrickjp93 said:

Getting banks to change technologies is far harder than convincing you, but I succeeded at the former.

Try getting defence contracts to change mindset... That will go down well, I am sure. Especially if the situation is compounded by a mountain of legacy implementations.

2 minutes ago, patrickjp93 said:

And hence I'll leave you with these as well.

Thank you so much for burying me under all of that.

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Nuluvius said:

Thank you so much for burying me under all of that.

11 minutes ago, patrickjp93 said:

Getting banks to change technologies is far harder than convincing you, but I succeeded at the former.

 

Well that was nice folks. Thanks for tainting my first possibly pinnable post.

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Nuluvius said:

How dare you... xD

Try getting defence contracts to change mindset... That will go down well, I am sure. Especially if the situation is compounded by a mountain of legacy implementations.

Thank you so much for burying me under all of that.

Oh that tears it. So, the community got the DOD to change the flight controllers on the F16 and F35 to C++...

 

 

Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×