| General > General Technical Chat |
| How many people code in C these days, and if so, why? |
| << < (67/99) > >> |
| chriva:
Arduino is still junk no matter which language you use tho :P |
| Nominal Animal:
--- Quote from: engrguy42 on May 12, 2020, 02:40:32 pm ---So is it that most folks here don't deal with those higher level languages and design concepts because they're more about the lower level hardware systems? --- End quote --- I think so. When I did custom stuff for a living, I specialized in server-side stuff, where hw is cheap, but security easy to fuck up (and that's what I'm good at). Most of my code was either custom glue and security filtering between/in front of systems, or new to me too. One 'library' that I failed with – in the sense of ending up rewriting it about half a dozen times in as many years – was form and file upload handling around the turn of the century. Part of it was my inexperience (I didn't know what kind of API would work for most use cases and be maintainable in the long term), and part was that then, browsers were really, really shitty about following the standards (they didn't). So you had user agent checks and workarounds galore. I cursed the people who decided to use MIME instead of a chunked or escaped transfer encoding many a time to the deepest hells.. And a part was that I was also battling with other browser inanities, getting non-ASCII characters from various Windows and Mac systems to transfer correctly. Not many people then cared, but I did. --- Quote from: madires on May 12, 2020, 03:07:17 pm ---Arduino is C++, just saying. ;D --- End quote --- Ever tried to use an exception in Arduino? No? That's what I thought. Arduino is not C++, but an unspecified subset of it. You could call it freestanding C++, I guess, as opposed to normal hosted C++, because C++ leaves just about everything 'implementation defined' in freestanding environments. That was one of my questions earlier, BTW. Can you call it C++ if you are only allowed to use a small subset of the features of C++? Especially when that subset is not described exactly anywhere? I feel like saying it is C++ is misleading to newcomers/programmers, and will lead to frustration. |
| coppice:
--- Quote from: Nominal Animal on May 12, 2020, 03:19:12 pm ---That was one of my questions earlier, BTW. Can you call it C++ if you are only allowed to use a small subset of the features of C++? Especially when that subset is not described exactly anywhere? I feel like saying it is C++ is misleading to newcomers/programmers, and will lead to frustration. --- End quote --- Names are chosen to obscure, not illuminate. Hence they chose the name C++, that appears to be an incremental change from C, for a language that is a radical departure. If you strip C++ back to the point where it genuinely is an incremental change the name C++ would become meaningful, and that wouldn't do at all. :) |
| Wolfgang:
--- Quote from: madires on May 12, 2020, 03:07:17 pm ---Arduino is C++, just saying. ;D --- End quote --- Some thoughts to C++ on microcontrollers with limited memory: IMHO, a really silly idea. Dynamic memory needs a memory manager, an this needs to take care of fragmentation, free space recovery, garbage collection... Causing nondeterministic execution times, out of memory errors when enough memory *should* be there, but not in 1 chunk as you need it and so on. My strong advice: dynamic memory (malloc), OO string classes, ... forget it if you want a reliable app. Arduino only works well if you never try something risky. Realtime/Interrupt stuff combined ith OO ? A nightmare. Keep stack small, always know where your vars are, use C as an interface to machine language (L.Torvalds idea). That should work on small platforms. |
| nctnico:
--- Quote from: Wolfgang on May 12, 2020, 04:05:49 pm ---Some thoughts to C++ on microcontrollers with limited memory: IMHO, a really silly idea. Dynamic memory needs a memory manager, an this needs to take care of fragmentation, free space recovery, garbage collection... Causing nondeterministic execution times, out of memory errors --- End quote --- That is a myth and thus completely wrong. For starters: C++ doesn't even has a garbage collector :palm: --- Quote from: Nominal Animal on May 12, 2020, 03:19:12 pm --- --- Quote from: madires on May 12, 2020, 03:07:17 pm ---Arduino is C++, just saying. ;D --- End quote --- Ever tried to use an exception in Arduino? No? That's what I thought. Arduino is not C++, but an unspecified subset of it. You could call it freestanding C++, I guess, as opposed to normal hosted C++, because C++ leaves just about everything 'implementation defined' in freestanding environments. That was one of my questions earlier, BTW. Can you call it C++ if you are only allowed to use a small subset of the features of C++? Especially when that subset is not described exactly anywhere? I feel like saying it is C++ is misleading to newcomers/programmers, and will lead to frustration. --- End quote --- But the same is true for C. There is a lot from the standard library you can't use. File I/O for example. Malloc & free are also troublesome to say the least. |
| Navigation |
| Message Index |
| Next page |
| Previous page |