Author Topic: what is the most relevant programming language for ee?  (Read 15826 times)

0 Members and 1 Guest are viewing this topic.

Offline spec

  • Frequent Contributor
  • **
  • Posts: 833
  • Country: england
  • MALE
Re: what is the most relevant programming language for ee?
« Reply #50 on: November 05, 2018, 05:51:30 am »
In a technical field, unless you've found and gotten stuck in a particular niche, you continue learning for your entire career. One of the most important lessons you get from your formal education is learning how to teach yourself, if you didn't know already.

So true: learning how to learn. That is the key to success.  :-+

The pro programmers I have known seemed to be able to use most languages.

On one big project the core language was Ada, but there were chunks of assembler, Fortran, Basic and C.
« Last Edit: November 05, 2018, 06:00:25 am by spec »
 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2275
  • Country: 00
Re: what is the most relevant programming language for ee?
« Reply #51 on: November 05, 2018, 07:23:01 am »
I would like to really underline that C is obsolete and if you have no experience in programming you should forget C (it will only teach you bad thoughts) and go right ahead to learning C++.

Now I understand  your nickname. C is far from obsolete and is here to stay for a long time, whether you like it or not.
And C++ is a terrible language...
 
The following users thanked this post: xrunner

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: what is the most relevant programming language for ee?
« Reply #52 on: November 05, 2018, 08:12:45 am »
just to mention: even though the arduino language uses a c++ like syntax, it is in fact no c++, although it uses the gcc toolchain, there is no libstdc++ for the avr platform but only the avr-libc.

So far i guess c and asm are the most used languages in the EE environment - so far that, what I used; for bigger embedded platforms python is coming into business.
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23099
  • Country: gb
Re: what is the most relevant programming language for ee?
« Reply #53 on: November 05, 2018, 08:15:45 am »
@Karel: I couldn’t agree more.

If anything more people need to learn C.

For me, on the desktop, you write in python and fix the slow bits using C extensions.

On embedded stuff, C first every time.

No C++, no java. There is no place for abstraction that deep in that space. Even the bastardised C++ on Arduino stuff is vile.

There is some room for some imperative stuff like FORTH however.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4705
  • Country: au
  • Question Everything... Except This Statement
Re: what is the most relevant programming language for ee?
« Reply #54 on: November 05, 2018, 09:15:13 am »
C / C++ for the micros, and probably python for UI to those devices

It mainly comes down to your use case, but my approach is bash out the functionality in "Bodge code" the ugly inefficient stuff that you know will work, e.g. going as far as bit banging a protocol, then setup the test cases and begin cleaning it up as time allows, you already know it works, you can demo it or release a version early if push comes to shove. but it keeps dev time short.

 

Online brucehoult

  • Super Contributor
  • ***
  • Posts: 4767
  • Country: nz
Re: what is the most relevant programming language for ee?
« Reply #55 on: November 05, 2018, 09:32:35 am »
just to mention: even though the arduino language uses a c++ like syntax, it is in fact no c++, although it uses the gcc toolchain, there is no libstdc++ for the avr platform but only the avr-libc.

"Wiring" (the Arduino language) uses a common subset of C++ and Java and a custom library that has implementations in both.

If you compile Wiring with C++ then a preprocessor adds a #include for the library, followed by forward declarations for all the top level functions in the source files (so that, like in Java, the user doesn't have to put them in any particular order).

If you compile Wiring with Java then a preprocessor adds some imports and wraps all the user code in a class declaration.

If you know that you'll never compile a given Wiring program with Java (as is the case with Arduino) then you can go crazy using almost the full range of C++ language features, but not the standard C++ library.
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 21225
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: what is the most relevant programming language for ee?
« Reply #56 on: November 05, 2018, 09:49:53 am »
I would like to really underline that C is obsolete and if you have no experience in programming you should forget C (it will only teach you bad thoughts) and go right ahead to learning C++.

Now I understand  your nickname. C is far from obsolete and is here to stay for a long time, whether you like it or not.
And C++ is a terrible language...

:)

"If C++ is the answer, you ought to reframe the question"
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline Crazy_Pete

  • Regular Contributor
  • *
  • Posts: 51
  • Country: us
Re: what is the most relevant programming language for ee?
« Reply #57 on: November 05, 2018, 12:03:31 pm »
As i pointed out in a private message (and to the wrong person i think, i DO apologise!)  Religion is also obsolete and here to stay whether we like it or not.   C++ was designed as and functions as a drop in replacement for C.  The arduino environment is C++ to a great extent.   The compiler is the g++ compiler and the Arduino environment both includes and happily accepts code written in strict ANSI C++.    Saying that Arduino uses a "Subset" of C++ is demonstrably false.

The problem with learning C is that it like religion, it will train your mind towards obsolete thinking.  If you are lucky enough not to be have been taught C, then forget C.   Learning C++ will teach you everything you need to know about C and also give you the ability to use a higher level programming language.    To say that there is no place for abstraction in hardware is a absurd.    The arduino people used to say that until about 10 years when i showed them you could reduce program size by a few hundred bytes using C++ over C.   I am sure that my efforts are a small part of a greater demonstration by many that convinced the Arduino people to make the Arduino environment C++.      I hardly consider "It's here to stay whether you like it or not" as a positive endorsement.   I can say the same thing about Herpes.   (Which like religion, i am also immune to!)  Of course C++ obsoletes C.   I am not aware of ANYTHING you can do in C that you can't do in C++.   If you choose for whatever reason not to use the OO features of C++, the increased type checking, overloading and namespaces found in C++ simply render  ANSI obsolete as a matter of fact.   (C++ when used as strictly a procedural language obsoletes C at the starting gate.)

I knew this would turn into a typical religion versus science war, but to finish it off, exactly what can you do in C that you can't do in C++?

Hilariously, the machines on which i learnt C++ are dwarfed by many of todays microcontrollers.   I just purchased a half dozen ESP32 boards on the cheap from China!   (Xi Xi China!!!!!)   It is a 32 bit RISC machine  with half a meg of STATIC RAM!!!!    I can remember telling a fellow who was a certified Genius  (you know they have a test for that, it is a called an IQ test.)  "You know, i am really glad i learned C++, although i admit, having a machine with128K of DRAM sort of makes it cheating since that much RAM is a huge playground.   I dream of one day having a computer running at 10MHz with half a meg of STATIC RAM! "  He laughed and said "Not in our lifetimes." Now that unbelievable dream machine is an $8 USD dev board and people are saying "There is no room for abstraction on a platform like that".       This is the ULTIMATE "HA!  WHEN I WAS A BOY!"   :-)


Thanks to all.
Peter
Your enemies pray for a shovel but your own tongue will dig your grave... (Traveller Proverb)
 

Offline Sudo_apt-get_install_yum

  • Regular Contributor
  • *
  • Posts: 165
  • Country: se
Re: what is the most relevant programming language for ee?
« Reply #58 on: November 05, 2018, 12:45:17 pm »
As many before me have said: C & C++ are the most used languages in embedded programming. Are they the best, probably. Here’s is why I think it’s so.
C & C++ are one of the most used languages in the world and without a doubt the most used language in embedded programming so when the next person comes to update the product and has to redo the code they are going to have an easier time doing so since they most likely already know the language.
If it was written in Python it most likely would be much harder to modify for someone on the outside since it’s a less common language in embedded programming.
C & C++ are also universally used when it comes to µC’s so regardless of what company you go for or type of µC, your almost guaranteed to be able to program it using C/C++

But the most important thing in my opinion is how you program!

An older product at work was created by an old colleague of mine. He was a C/C++ programming wiz but he was a wiz for high level software products. Like windows applications and such, these programs are designed to be "modular" so you can easily add/remove features.
This is generally good because software is easily distributed and can be updated without much hassle, it is not the in the case of embedded design because much of the time you’ll never change the software on the product because most of the times it is linked to the hardware.

Anyway the code was well written but not optimized for embedded use so it was really slow and didn’t perform as well as it could have.
The µC in the product was a 32-bit ARM running at 32MHz and it was running horribly slow.
This was later changed to an 8-bit Atmega running at 1MHz and it was kicking the ARM's ass by a long shot, both in performance and power consumption.

The same guy who used the ARM also created a product using a 32-bit ARM running at 96MHz (Could be mistaken this was a while ago) and made a RTOS for it witch was WAY overkill for a product like that. It was never corrected because it would be to labor intensive but version 2 used a 16-bit micro at 8MHz, this kicked its ass as well!

So the moral of the story is it’s not the language its how you use it! Or like some people say "It’s not the size that matters, its how you swing it!"
 

Offline Crazy_Pete

  • Regular Contributor
  • *
  • Posts: 51
  • Country: us
Re: what is the most relevant programming language for ee?
« Reply #59 on: November 05, 2018, 12:47:14 pm »
Sigh,

Sorry for feeding the trolls.  I did NOT check "save a copy" of sent messages in profile so i have no idea to whom i sent that private message about C and religion.    Sorry about that if it was to the wrong person.   I am also sorry for feeding the trolls.    I wonder if we should start a new topic or area for Object Oriented Embedded Programming?   Arguing with someone who says "X cannot be done" is a far less productive action than actually doing X and then showing the world how it is done.

Thanks to all,

Crazy Pete

Your enemies pray for a shovel but your own tongue will dig your grave... (Traveller Proverb)
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23099
  • Country: gb
Re: what is the most relevant programming language for ee?
« Reply #60 on: November 05, 2018, 12:58:52 pm »
This isn't a religious war for ref.

Just a point, I've been writing C++ for about 20 years and C for about 25. On Windows, Unix and embedded systems.

You are completely wrong. C++ is a different language. It's not a drop in replacement. Even Stroustrop said that.

C++ has a hell of a lot more foot guns which really do bugger you pretty hard:

1. Very unstable ABI
2. RTTI
3. Exceptions (non explicit control flow)
4. Little control of stack
5. Poor allocation control (try writing a C++ program that doesn't allocate)
6. Name manging from templates
7. Buggy as fuck compilers
8. autos.
9. No one who likes C++ has had to debug something someone has used more than 2 STL templates in.
10. Toolchain instability

You can spot the problems when you look at the coding guidelines every organisation has. Everything is "don't use features X, Y, Z".

It's not what can you do in C, it's what can't you do in C and how you are forced to think. And that is in terms of tangible memory, abstractions and algorithms. Every foot is carefully placed. Never do you step in shit.

So you can get a 32-bit machine with a meg of RAM for $8 but you can get an 8-bit machine with 4k of RAM for $0.50 and solve the same problem.
 
The following users thanked this post: xrunner, Karel

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 21225
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: what is the most relevant programming language for ee?
« Reply #61 on: November 05, 2018, 01:24:28 pm »
I would like to really underline that C is obsolete and if you have no experience in programming you should forget C (it will only teach you bad thoughts) and go right ahead to learning C++.

Now I understand  your nickname. C is far from obsolete and is here to stay for a long time, whether you like it or not.
And C++ is a terrible language...

to which the response was...

As i pointed out in a private message (and to the wrong person i think, i DO apologise!)  Religion is also obsolete and here to stay whether we like it or not.   C++ was designed as and functions as a drop in replacement for C.  The arduino environment is C++ to a great extent.   The compiler is the g++ compiler and the Arduino environment both includes and happily accepts code written in strict ANSI C++.    Saying that Arduino uses a "Subset" of C++ is demonstrably false.

The problem with learning C is that it like religion, it will train your mind towards obsolete thinking.  If you are lucky enough not to be have been taught C, then forget C.   Learning C++ will teach you everything you need to know about C and also give you the ability to use a higher level programming language.    To say that there is no place for abstraction in hardware is a absurd.    The arduino people used to say that until about 10 years when i showed them you could reduce program size by a few hundred bytes using C++ over C.   I am sure that my efforts are a small part of a greater demonstration by many that convinced the Arduino people to make the Arduino environment C++.      I hardly consider "It's here to stay whether you like it or not" as a positive endorsement.   I can say the same thing about Herpes.   (Which like religion, i am also immune to!)  Of course C++ obsoletes C.   I am not aware of ANYTHING you can do in C that you can't do in C++.   If you choose for whatever reason not to use the OO features of C++, the increased type checking, overloading and namespaces found in C++ simply render  ANSI obsolete as a matter of fact.   (C++ when used as strictly a procedural language obsoletes C at the starting gate.)

I knew this would turn into a typical religion versus science war, but to finish it off, exactly what can you do in C that you can't do in C++?

Hilariously, the machines on which i learnt C++ are dwarfed by many of todays microcontrollers.   I just purchased a half dozen ESP32 boards on the cheap from China!   (Xi Xi China!!!!!)   It is a 32 bit RISC machine  with half a meg of STATIC RAM!!!!    I can remember telling a fellow who was a certified Genius  (you know they have a test for that, it is a called an IQ test.)  "You know, i am really glad i learned C++, although i admit, having a machine with128K of DRAM sort of makes it cheating since that much RAM is a huge playground.   I dream of one day having a computer running at 10MHz with half a meg of STATIC RAM! "  He laughed and said "Not in our lifetimes." Now that unbelievable dream machine is an $8 USD dev board and people are saying "There is no room for abstraction on a platform like that".       This is the ULTIMATE "HA!  WHEN I WAS A BOY!"   :-)

QED, I believe.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: bd139

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 21225
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: what is the most relevant programming language for ee?
« Reply #62 on: November 05, 2018, 01:37:41 pm »
6. Name manging from templates
7. Buggy as fuck compilers
10. Toolchain instability

You can spot the problems when you look at the coding guidelines every organisation has. Everything is "don't use features X, Y, Z".

While I agree with your other points, those points are the real killers - especially the last.

Subsetting a language is an orange flag, especially when every organisation chooses a different subset.

And never forget the https://en.wikibooks.org/wiki/C%2B%2B_Programming/Templates/Template_Meta-Programming#History_of_TMP
where the key, horrifying, accurate word is "discovered". Here's a first-hand account of what happened and Soustroup's reaction:
https://translate.google.com/translate?sl=de&tl=en&u=http%3A%2F%2Fwww.erwin-unruh.de%2Fmeta.htm
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: what is the most relevant programming language for ee?
« Reply #63 on: November 05, 2018, 03:21:34 pm »
as a programming language, I learned Basic during my EE degree, 30 years ago ...
well I did not learn it because I knew it before, but that's all we were teached at that time.

My first programming language was FORTRAN (more than 30 years ago!!).  However, when I need to solve a problem today (not write an app to sell or give away), I use BASIC.  Why??  Because LibertyBasic offers a great Windows interface that is quick and easy, it is my go to (not goto) to get an answer.  Just the other day, I wrote a BASIC program that fixes the damn QFX data format that Wells Fargo has found a way to screw up!!

When writing embedded stuff, I use C (for the arduino or a SiLabs micro)...because that is what Arduino and Keil provide.

...and...of course...Excel
 

Offline kripton2035

  • Super Contributor
  • ***
  • Posts: 2712
  • Country: fr
    • kripton2035 schematics repository
Re: what is the most relevant programming language for ee?
« Reply #64 on: November 05, 2018, 04:14:06 pm »
I use Xojo basic simply because it works on mac,win,linux,raspberry quite with the same source code
and on iOS with some resource, and soon android.
 
The following users thanked this post: Wimberleytech

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3573
  • Country: it
Re: what is the most relevant programming language for ee?
« Reply #65 on: November 05, 2018, 04:39:12 pm »
As i pointed out in a private message (and to the wrong person i think, i DO apologise!)  Religion is also obsolete and here to stay whether we like it or not.   C++ was designed as and functions as a drop in replacement for C.  The arduino environment is C++ to a great extent.   The compiler is the g++ compiler and the Arduino environment both includes and happily accepts code written in strict ANSI C++.    Saying that Arduino uses a "Subset" of C++ is demonstrably false.

The problem with learning C is that it like religion, it will train your mind towards obsolete thinking.  If you are lucky enough not to be have been taught C, then forget C.   Learning C++ will teach you everything you need to know about C and also give you the ability to use a higher level programming language.    To say that there is no place for abstraction in hardware is a absurd.    The arduino people used to say that until about 10 years when i showed them you could reduce program size by a few hundred bytes using C++ over C.   I am sure that my efforts are a small part of a greater demonstration by many that convinced the Arduino people to make the Arduino environment C++.      I hardly consider "It's here to stay whether you like it or not" as a positive endorsement.   I can say the same thing about Herpes.   (Which like religion, i am also immune to!)  Of course C++ obsoletes C.   I am not aware of ANYTHING you can do in C that you can't do in C++.   If you choose for whatever reason not to use the OO features of C++, the increased type checking, overloading and namespaces found in C++ simply render  ANSI obsolete as a matter of fact.   (C++ when used as strictly a procedural language obsoletes C at the starting gate.)

I knew this would turn into a typical religion versus science war, but to finish it off, exactly what can you do in C that you can't do in C++?

Hilariously, the machines on which i learnt C++ are dwarfed by many of todays microcontrollers.   I just purchased a half dozen ESP32 boards on the cheap from China!   (Xi Xi China!!!!!)   It is a 32 bit RISC machine  with half a meg of STATIC RAM!!!!    I can remember telling a fellow who was a certified Genius  (you know they have a test for that, it is a called an IQ test.)  "You know, i am really glad i learned C++, although i admit, having a machine with128K of DRAM sort of makes it cheating since that much RAM is a huge playground.   I dream of one day having a computer running at 10MHz with half a meg of STATIC RAM! "  He laughed and said "Not in our lifetimes." Now that unbelievable dream machine is an $8 USD dev board and people are saying "There is no room for abstraction on a platform like that".       This is the ULTIMATE "HA!  WHEN I WAS A BOY!"   :-)


Thanks to all.
Peter


This is all good and everything. Too bad my architecture of choice only has a (good) C compiler.
It would be nice to have other options but there is only a (good) C compiler available.
Until this changes, C is going to stay
 

Online brucehoult

  • Super Contributor
  • ***
  • Posts: 4767
  • Country: nz
Re: what is the most relevant programming language for ee?
« Reply #66 on: November 06, 2018, 01:56:37 am »
As i pointed out in a private message (and to the wrong person i think, i DO apologise!)  Religion is also obsolete and here to stay whether we like it or not.   C++ was designed as and functions as a drop in replacement for C.  The arduino environment is C++ to a great extent.   The compiler is the g++ compiler and the Arduino environment both includes and happily accepts code written in strict ANSI C++.    Saying that Arduino uses a "Subset" of C++ is demonstrably false.

Nothing in the example code that comes with Arduino or on the Arduino or Wiring examples web sites uses:

- multiple inheritance
- templates

To name just two C++ features.

Yes, you can use those features in your own code if you know that it will only be used in the Arduino IDE with boards that use a C++ compiler.

Quote
Hilariously, the machines on which i learnt C++ are dwarfed by many of todays microcontrollers.   I just purchased a half dozen ESP32 boards on the cheap from China!   (Xi Xi China!!!!!)   It is a 32 bit RISC machine  with half a meg of STATIC RAM!!!!    I can remember telling a fellow who was a certified Genius  (you know they have a test for that, it is a called an IQ test.)  "You know, i am really glad i learned C++, although i admit, having a machine with128K of DRAM sort of makes it cheating since that much RAM is a huge playground.   I dream of one day having a computer running at 10MHz with half a meg of STATIC RAM! "  He laughed and said "Not in our lifetimes." Now that unbelievable dream machine is an $8 USD dev board and people are saying "There is no room for abstraction on a platform like that".       This is the ULTIMATE "HA!  WHEN I WAS A BOY!"   :-)

This I *emphatically* agree with. My early experience was on Apple ][ and CP/M machines with with 32 KB to 64 KB RAM, or PDP-11 with 64 KB for an individual program.

Everything was running at under 1 MIPS -- the clock could be a couple of MHz, but instructions took a number of clock cycles each. And the instructions were so awkward and the number of CPU registers so small that you needed a lot more instructions to complete any particular task than on even an AVR, let alone ARM or RISC-V or MIPS.

Even the number of bytes of code it took to do anything was much bigger than now, which further wasted the limited memory.

And those were the big machines, capable of running usable programming IDEs and symbolic assemblers or compilers. You can use "advanced" programming techniques and facilities on much smaller systems than that, provided that you have a bigger system to compile it on.
 

Offline Crazy_Pete

  • Regular Contributor
  • *
  • Posts: 51
  • Country: us
Re: what is the most relevant programming language for ee?
« Reply #67 on: November 06, 2018, 02:26:44 am »
>Nothing in the example code that comes with Arduino or on the Arduino or Wiring examples web sites uses:

So what?

I probably should quit while i am ahead since "So what?" sinks that argument, but....

You are utterly and absolutely sure that no third party library ANYWHERE uses Templates or Multiple Inheritance?    I am sorry but that is the sort of semantic hair splitting that comes when you engage in a religious argument.   The arduino IDE uses and supports C++.    The claim that no embedded project uses C++ is just nonsense.    The one feature of C++ that tends NOT to be implemented on MCUs is new/delete and that is simply because many mcus lack a proper memory controller.    Like i said in an earlier post, the Joy of the ESP32 is that it is half a meg of STATIC RAM!    It is so far advanced beyond the "DESKTOP" machines of 1990 that even C++ features like new/delete are obsolete.   The C++ standard is 100s of pages long.   AFAIK i am the only person who ever wrote code that uses C++ "Template Template Arguments" and it wasn't all that useful and i took it out of the code.   Since nobody chooses to use that feature i guess only a subset of C++ is used on Mainframes and desktops as well.


1) Show me an Ard that doesn't use a C++ compiler
2) Since when is "hardware specific" not a given in MCU programming?

thanks
Crazy Pete

Your enemies pray for a shovel but your own tongue will dig your grave... (Traveller Proverb)
 

Offline Crazy_Pete

  • Regular Contributor
  • *
  • Posts: 51
  • Country: us
Re: what is the most relevant programming language for ee?
« Reply #68 on: November 06, 2018, 02:37:53 am »
>This is all good and everything. Too bad my architecture of choice only has a (good) C compiler

What arch has only a C compiler, i am curious because AFAIK g++ has been ported to a HUGE variety of MCUs.

Also the original posters questions was (IIRC) not "What language should i use on a platform that supports only C?"  It was "What language should i learn if i am new to the field?"

As these C programmers are demonstrating, once you learn C, you will have a terrible time learning C++.   However if you learn C++ first you will have no trouble at all reading other people's C code.    C is to C++ what religion is to science.    If you learn science first you will have no trouble understanding religion.  If you learn religion first your thinking will alway tend towards circular reasoning and "I belong to a community that thinks this way and we can't all be wrong" sort of  thinking that you see people using to justify C.

You will see C (catch the chinese pun? ;-) everywhere and you need to be able to read and understand and maintain it.   You will also see C++ everywhere and will need to be able to read and maintain it.   The only way to kill BOTH of those birds with ONE stone is to learn C++ first.


Xi Xi  :-)

Crazy Pete
Your enemies pray for a shovel but your own tongue will dig your grave... (Traveller Proverb)
 

Offline rjp

  • Regular Contributor
  • *
  • Posts: 124
  • Country: au
Re: what is the most relevant programming language for ee?
« Reply #69 on: November 06, 2018, 02:38:27 am »
Its a shame that nobody with serious clout has done a c+ yet - which is the useful subset of c++ that every damn modern language has run with - python,c#,java. dart etc.
 
Bascially c structs with single inheritance that makes building core framework plugins like "Stream" easier without pointer casting.

Namespacing to avoid foo_bah_wah clumsyness in libraries.

then a more modern std library.

 

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2418
  • Country: us
Re: what is the most relevant programming language for ee?
« Reply #70 on: November 06, 2018, 03:04:17 am »
Its a shame that nobody with serious clout has done a c+ yet - which is the useful subset of c++ that every damn modern language has run with - python,c#,java. dart etc.
 
Bascially c structs with single inheritance that makes building core framework plugins like "Stream" easier without pointer casting.

Namespacing to avoid foo_bah_wah clumsyness in libraries.

then a more modern std library.

What's the point? It's already there in C++, just as C remains a subset of C++. You just don't use the features you don't want to use.

People cloak it in C vs C++ labels, but the real "religious" argument is usually about procedural vs object oriented approaches. Both approaches have value, although the extremists in either camp may choose to argue that. Anyone who has to understand and maintain existing code better be willing to understand both.
 

Offline Crazy_Pete

  • Regular Contributor
  • *
  • Posts: 51
  • Country: us
Re: what is the most relevant programming language for ee?
« Reply #71 on: November 06, 2018, 03:06:35 am »

>Its a shame that nobody with serious clout has done a c+ yet

I thought that was what C# was?   (Basically MS couldn't get it together to write a C++ compiler.  They finally released C# as a political move to turn failure into propaganda victory.)

Most people don't use multiple inheritance anyway.   That was the whole idea and the reason why C++ was designed to obsolete C in the first place.  If a feature isn't useful, don't use it.

thanks
Crazy Pete
Your enemies pray for a shovel but your own tongue will dig your grave... (Traveller Proverb)
 

Offline rjp

  • Regular Contributor
  • *
  • Posts: 124
  • Country: au
Re: what is the most relevant programming language for ee?
« Reply #72 on: November 06, 2018, 03:09:56 am »
Its a shame that nobody with serious clout has done a c+ yet - which is the useful subset of c++ that every damn modern language has run with - python,c#,java. dart etc.
 
Bascially c structs with single inheritance that makes building core framework plugins like "Stream" easier without pointer casting.

Namespacing to avoid foo_bah_wah clumsyness in libraries.

then a more modern std library.

What's the point? It's already there in C++, just as C remains a subset of C++. You just don't use the features you don't want to use.

People cloak it in C vs C++ labels, but the real "religious" argument is usually about procedural vs object oriented approaches. Both approaches have value, although the extremists in either camp may choose to argue that. Anyone who has to understand and maintain existing code better be willing to understand both.

The point is that nobody agrees to the subset and everyone makes their own clumsy NIH here version of the framework library.
 
 

Offline Crazy_Pete

  • Regular Contributor
  • *
  • Posts: 51
  • Country: us
Re: what is the most relevant programming language for ee?
« Reply #73 on: November 06, 2018, 03:10:48 am »
Thanks Nusa!

I couldn't have said it better myself.   You need to be able to understand both procedural and object oriented programming.   Understanding functional programming is even better.  (Re. the post by the guy who managed to blow a C++ program outta the water by writing it in Dylan.)  The honest truth is that for most small day to day tasks, procedural programming is better.  (The playlist program i use to listen to music is written bash script, i don't write a C++ program everytime i wanna change the music!)

The problem with LEARNING C is that it makes it nearly impossible to learn C++, whereas if you learn C++ first (Hatokays original question) you have a great background and ability in both C and C++.

thanks

Crazy Pete
Your enemies pray for a shovel but your own tongue will dig your grave... (Traveller Proverb)
 

Offline rjp

  • Regular Contributor
  • *
  • Posts: 124
  • Country: au
Re: what is the most relevant programming language for ee?
« Reply #74 on: November 06, 2018, 03:13:31 am »

>Its a shame that nobody with serious clout has done a c+ yet

I thought that was what C# was?   (Basically MS couldn't get it together to write a C++ compiler.  They finally released C# as a political move to turn failure into propaganda victory.)

Most people don't use multiple inheritance anyway.   That was the whole idea and the reason why C++ was designed to obsolete C in the first place.  If a feature isn't useful, don't use it.

thanks
Crazy Pete

well the thing is that all those features that you shouldnt use, do get used, and c++ can be a nightmare when multiple inheritance and templates are used to their fullest insanity.

c# is aimed at desktops and is VM based and has a monster std lib - but yes i was  dreaming of a c# style subset but aimed at micro's with efficient binary compilation,
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf