Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Broad Question for C++ coders

125 views
Skip to first unread message

udt...@gmail.com

unread,
May 17, 2015, 2:32:49 PM5/17/15
to
Hope everyone for a nice weekend,

Defining programmers as those who authored any amount of C++ code that made it into production environment -
If you could add one thing - anything at all - to the core language or the new standard, what would it be ?
And in a same way, but trickier, what if anything would you like to see removed ? (in a sense of not just not having to use a feature or a paradigm, but also not having to deal with it or consider it's use by others)

Thanks

Wouter van Ooijen

unread,
May 17, 2015, 3:07:17 PM5/17/15
to
udt...@gmail.com schreef op 17-May-15 om 8:32 PM:
add:
- in general: make the language & libraries more usable in a small
system, that is: without heap, RTTI, exceptions
- make all constexpr values acceptable as template arguments
- named parameter association
- 'override' also for static methods
- (compiler option) issue a warning for a missing override

remove:
The problem is that any drastic removal will harm the survival of the
language, so for that reason I would not remove anything. If that was
not an issue:
- most automatic (invisible) conversions
- the declare-as-you-would-use-it style of syntax
- goto, labels (except for a switch), fallthrough in a switch
- char being a kind of integer

Wouter



Jorgen Grahn

unread,
May 17, 2015, 3:57:47 PM5/17/15
to
On Sun, 2015-05-17, udt...@gmail.com wrote:
> Hope everyone for a nice weekend,
>

> Defining programmers as those who authored any amount of C++ code
> that made it into production environment -

> If you could add one thing - anything at all - to the core language
> or the new standard, what would it be ?

> And in a same way, but trickier, what if anything would you like to
> see removed ? (in a sense of not just not having to use a feature or a
> paradigm

Nothing, and nothing. I'm fairly pleased with C++ as it is, and leave
improvements to others. It didn't occur to me, for example, that
'auto' could be used as in C++11, even though I was familiar with type
inference from other languages.

> but also not having to deal with it or consider it's use by
> others)

There are lots of features I think are overused (arrays and stuff from
C-style programmers, new/delete from Java programmers, deep
inheritance hierarchies from OOP people, ...) but they all have
important uses and it wouldn't be C++ without them.

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .

Öö Tiib

unread,
May 17, 2015, 4:57:57 PM5/17/15
to
On Sunday, 17 May 2015 21:32:49 UTC+3, udt...@gmail.com wrote:
> Hope everyone for a nice weekend,
>
> Defining programmers as those who authored any amount of C++ code that
> made it into production environment -
> If you could add one thing - anything at all - to the core language or
> the new standard, what would it be ?

Most odd for me is that C++ lacks a type for representing "UTF-8
code unit". 'char' does not work as it means "a byte" in C++ and
so a pointer to it means a pointer to some memory.

> And in a same way, but trickier, what if anything would you like to
> see removed ? (in a sense of not just not having to use a feature
> or a paradigm, but also not having to deal with it or consider it's
> use by others)

I would happily remove lot of pointless looseness of it (but that may
mean actually adding to language or changing it). For example:
* Silent conversions between arithmetic types.
* Silent conversions between pointers and bools.
* Implicitly compiler-generated constructors and assignment operators.
* Undefined signed integer overflow.
* Unspecified argument evaluation order.
...
and so on.

udt...@gmail.com

unread,
May 17, 2015, 4:57:59 PM5/17/15
to
Personally, I would like to see some operators that would map to hardware features that are fairly common, yet not so accessible at the time (like bit rotation). Being called a glorified assembler isn't necessarily a bad thing, and gives some street cred to live up to ...
Also, while C++11 tasking and lambdas is a step in the right direction, I find Ada way of handling tasking impressive and C++ could benefit from stuff like task types , select/accept and protected types.
And standardizing symbol mangling would make object code compatible across different compilers.

Most coders I know would love to see implicit casting castrated. Their complaint usually lays with "other people's code", since "themselves" are disciplined enough, and compiler can be set up to its strictest to catch the most hidden conversions.
Message has been deleted

Öö Tiib

unread,
May 17, 2015, 5:10:54 PM5/17/15
to
On Monday, 18 May 2015 00:02:50 UTC+3, Stefan Ram wrote:
> Öö Tiib <oot...@hot.ee> writes:
> >Most odd for me is that C++ lacks a type for representing "UTF-8
> >code unit".
>
> The UTF-8 RFC 3629 does not define a term »code unit«.
> What does »code unit« suggest to you?

I trust C++ standard does use "code unit" when talking about strings.
Message has been deleted

Öö Tiib

unread,
May 17, 2015, 5:24:20 PM5/17/15
to
On Monday, 18 May 2015 00:12:07 UTC+3, Stefan Ram wrote:
> r...@zedat.fu-berlin.de (Stefan Ram) writes:
> >Öö Tiib <oot...@hot.ee> writes:
> >>Most odd for me is that C++ lacks a type for representing "UTF-8
> >>code unit".
> >The UTF-8 RFC 3629 does not define a term »code unit«.
> >What does »code unit« suggest to you?
>
> Maybe it refers to »encoding unit« or to »code point«?
>
> An encoding unit might be »uint8_t« or »uint_least8_t«,
> a code point »uint_least64_t« or simply »unsigned long«.

Unicode code point U+00B0 is degree character ° that is represented
by two 8-bit units in UTF-8: c2 and b0 (in that order). C++ standard
does call those "code units". I want a type that is meant to represent
that "code unit" (and nothing else). Do you understand now?

Sam

unread,
May 17, 2015, 9:07:34 PM5/17/15
to
When is his homework assignment due? What class is this, where you get
questions like this, leading up to your final exams?

woodb...@gmail.com

unread,
May 17, 2015, 9:35:13 PM5/17/15
to
On Sunday, May 17, 2015 at 1:32:49 PM UTC-5, udt...@gmail.com wrote:
> Hope everyone for a nice weekend,
>
> Defining programmers as those who authored any amount of C++ code that made it into production environment -
> If you could add one thing - anything at all - to the core language or the new standard, what would it be ?

I mentioned this in another thread, but I'd like to see a ctor
added to std::string that takes a char const* and an integer
value. The integer would be the length to reserve beyond the
length of the char const*. I think this ctor would help to
reduce the number of allocations strings do. It's surprising
to me that this wasn't added years ago. Better late than never.

I look forward to modules being added.

Brian
Ebenezer Enterprises - In G-d we trust.
http://webEbenezer.net

Paavo Helde

unread,
May 18, 2015, 12:29:09 AM5/18/15
to
udt...@gmail.com wrote in
news:7ba730fb-f510-46c8...@googlegroups.com:
1. Portable C++ ABI (something along the lines of e.g.
https://isocpp.org/files/papers/n4028.pdf)

2. Automatic conversions (numeric-to-bool, enum-to-numeric, numerics
themselves (though the last one is tricky, just slapping an explicit
static_cast everywhere where a conversion is required would make the things
even worse)).

udt...@gmail.com

unread,
May 18, 2015, 12:57:30 AM5/18/15
to
On Sunday, May 17, 2015 at 9:07:34 PM UTC-4, Sam wrote:
>
> When is his homework assignment due? What class is this, where you get
> questions like this, leading up to your final exams?

Who is "he", and what's bothering you so much about this question ? And do you always stick an attachment into your contribution to this global museum of wisdom and tolerance ?

Christopher Pisz

unread,
May 18, 2015, 11:15:44 AM5/18/15
to
Add:
datetime more like boost's
timezone not like boost's
exceptions with call stack built in
ability to see "who started the thread" when debugging
naming of threads

Remove:
globals
goto
variadic argument lists
C


--
I have chosen to troll filter/ignore all subthreads containing the
words: "Rick C. Hodgins", "Flibble", and "Islam"
So, I won't be able to see or respond to any such messages
---

Victor Bazarov

unread,
May 18, 2015, 11:24:09 AM5/18/15
to
On 5/18/2015 11:15 AM, Christopher Pisz wrote:
> On 5/17/2015 1:32 PM, udt...@gmail.com wrote:
>> Hope everyone for a nice weekend,
>>
>> Defining programmers as those who authored any amount of C++ code that
>> made it into production environment -
>> If you could add one thing - anything at all - to the core language or
>> the new standard, what would it be ?
>> And in a same way, but trickier, what if anything would you like to
>> see removed ? (in a sense of not just not having to use a feature or a
>> paradigm, but also not having to deal with it or consider it's use by
>> others)
>>
>> Thanks
> [..]
>
> Remove:
> [..]
> C

That way we'll end up with the language called "++", which is neither
here nor there. ;-)

V
--
I do not respond to top-posted replies, please don't ask

Jason C. McDonald

unread,
May 18, 2015, 2:39:32 PM5/18/15
to
On 05/18/2015 08:23 AM, Victor Bazarov wrote:
>> Remove:
>> [..]
>> C
>
> That way we'll end up with the language called "++", which is neither
> here nor there. ;-)
>
> V

So...we once had the attack of the one-letter languages. Now we'll have
the attack of the non-alphanumeric languages?

++
-- (for the minimalists)
?? (for absolutely beginners)
!! (for quick-and-dirty programming by people who reject all standards)
!%#*&@^ (for irritating the heck out of people)

--
Jason C. McDonald (CodeMouse92)
[CEO, Lead Dev @ MousePaw Games]

udt...@gmail.com

unread,
May 18, 2015, 8:31:58 PM5/18/15
to
> That way we'll end up with the language called "++", which is neither
> here nor there. ;-)
>
> V
> --
> I do not respond to top-posted replies, please don't ask

Victor - I'd be particularly curious in your response to the OP, if any.

Thank you

Juha Nieminen

unread,
May 18, 2015, 11:08:08 PM5/18/15
to
Christopher Pisz <nos...@notanaddress.com> wrote:
> Remove:
> globals

Globals like std::cout? Then how would you implement that?

In fact, main() is a global too.

> C

So no longer would you be able to define functions, create for and while
loops, conditionals... What would be left? Template metaprogramming?

As for the standard library functions inherited from C, some of them
are pretty handy, and sometimes more efficient than the C++ equivalents
(such as for example fread().)

--- news://freenews.netfront.net/ - complaints: ne...@netfront.net ---

Christian Gollwitzer

unread,
May 19, 2015, 2:47:31 AM5/19/15
to
Am 18.05.15 um 20:39 schrieb Jason C. McDonald:
> On 05/18/2015 08:23 AM, Victor Bazarov wrote:
>>> Remove:
>>> [..]
>>> C
>>
>> That way we'll end up with the language called "++", which is neither
>> here nor there. ;-)
>>
>> V
>
> So...we once had the attack of the one-letter languages. Now we'll have
> the attack of the non-alphanumeric languages?
>
> ++
> -- (for the minimalists)
> ?? (for absolutely beginners)
> !! (for quick-and-dirty programming by people who reject all standards)
> !%#*&@^ (for irritating the heck out of people)
>

++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.

Christian

Sam

unread,
May 19, 2015, 7:02:05 AM5/19/15
to
Yes, I do. This so-called "attachment" is called a "PGP digital signature".
You might be surprised that the Internet standard for digital signatures,
RFC 2015, was published in 1996. You might want to try to upgrade your
Usenet client to something more modern that was written this side of the
century mark. Oh, I see that you're using the confusing Google Groups to
read Usenet, and you may not even know what Usenet is. Oh, well, I guess you
can file a bug report with Google, then; and then marvel at the fact that
properly-written Usenet clients will know automatically what to do with this
so-called "attachment", without bothering the easily-confused user.

But I digress. The question remains on the table: when is this homework
assignment due, can you try answering that?

Victor Bazarov

unread,
May 19, 2015, 7:59:07 AM5/19/15
to
I am a mere user of the language. What's there I like, what's not there
I don't miss. I don't get frustrated by lack of a feature or by
supposed complexity. We are not artificially limited by a single
language in our real-world endeavours, so if something is not in one,
take the other, if it is more suited. Life's too short.

Besides, I currently work coding applications (not hardware, not
network, not libraries) so my focus is mostly on the algorithms,
formulas, workflow. The language for me is but a set of tools, and as
far as C++ goes, it's pretty complete and well-rounded for my purposes.

See Jorgen Grahn's reply. ;-)

And, sorry to disappoint, if so... :-/
0 new messages