You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
-
2Excuse me, but how much C++ code is embedded code? To be truthful, your domain ditches half of C++ features anyway (forbids their use). So, given how much code you have to write anyway, to replace ditched features of stdlib, you can easily write your own string_view. My vision is: stdlib must target the most common and widespread use-cases. And make the use of it features as comfortable as possible. All other corner cases can be written for specific domain. Ie, that's why stdlib doesn't have BTree or Trie implementation.GreenScape– GreenScape2022-06-22 20:55:42 +00:00Commented Jun 22, 2022 at 20:55
-
1@GreenScape not saying I like working with embedded C++. But a lot of embedded code is written in c++, mbed-os, pigweed, arduino, etl. string_view was a welcome addition for developing in embedded c++. I don't think the standard was written with embedded development in mind, but string_view just so happens to work well for embedded development.silvergasp– silvergasp2022-09-08 23:09:22 +00:00Commented Sep 8, 2022 at 23:09
-
3The is a surprisingly large amount of embedded C++ code out in wild because it actually often compiles into more efficient code then C. Also there are many features of C++ that are really useful such as templates, constexpr, function overloading, much better type safety, RAII etc.std::string_view increases safety for no additional effort on the developers part, so its really useful in embedded.Andrew Goedhart– Andrew Goedhart2022-09-15 09:09:20 +00:00Commented Sep 15, 2022 at 9:09
Add a comment
|
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
-
create code fences with backticks ` or tildes ~
```
like so
``` -
add language identifier to highlight code
```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible)
<https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. python-3.x), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you
lang-cpp