Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411490 Posts in 69371 Topics- by 58428 Members - Latest Member: shelton786

April 24, 2024, 05:56:29 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The happy programmer room
Pages: 1 ... 217 218 [219] 220 221 ... 279
Print
Author Topic: The happy programmer room  (Read 678337 times)
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4360 on: September 20, 2016, 02:35:39 PM »

Ah fair enough. I can get down with that. I generally feel a little bit of a tinge when I use the new keyword where I stop and think (there's probably a better way I can be doing this).
Logged

Average Software
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW
« Reply #4361 on: September 20, 2016, 02:43:35 PM »

Ah fair enough. I can get down with that. I generally feel a little bit of a tinge when I use the new keyword where I stop and think (there's probably a better way I can be doing this).

My personal goal is to use every keyword in the language I'm using in every project I do.  I have yet to achieve this, came really damn close with one of my Ada projects, I think I was only missing at and requeue.
Logged



What would John Carmack do?
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4362 on: September 20, 2016, 04:42:57 PM »

You could cheat and throw a bunch of stuff in an unused region of your project Beer!
Logged

oahda
Level 10
*****



View Profile
« Reply #4363 on: September 21, 2016, 12:39:20 AM »

I've used placement new for the first time ever in my current project with the unlimited unions of modern C++, but I'll probably change those unions to variants now anyway. The placement new syntax is really ugly and error-prone. Tongue

One keyword I've still never used and don't find myself using basically ever still is volatile. I also haven't used final, but maybe I will.
Logged

Average Software
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW
« Reply #4364 on: September 21, 2016, 03:38:17 AM »

The truly hardcore find a use for register.
Logged



What would John Carmack do?
oahda
Level 10
*****



View Profile
« Reply #4365 on: September 21, 2016, 03:40:31 AM »

Didn't even remember that one, so yeah...

EDIT: Speaking of the devil... Started watching this, and apparently register was removed in C++17!
« Last Edit: September 21, 2016, 04:01:26 AM by Prinsessa » Logged

Average Software
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW
« Reply #4366 on: September 21, 2016, 04:42:07 AM »

Didn't even remember that one, so yeah...

EDIT: Speaking of the devil... Started watching this, and apparently register was removed in C++17!

That surprises me.  There was some talk of repurposing it for the modules feature, much like they did with auto.  I believe export was going to be reused as well, since it's still reserved.
Logged



What would John Carmack do?
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4367 on: September 21, 2016, 04:43:59 AM »

The truly hardcore find a use for register.

Doesn't that come into play to prevent aliasing?

edit : I'm thinking of restrict.
Logged

oahda
Level 10
*****



View Profile
« Reply #4368 on: September 22, 2016, 05:43:02 AM »

This is in a way grumpier than happy, but since it relates to the previous discussions...

Interestingly, after having watched all these talks from cppcon 2015 these last few days, the 2016 ones just started cropping up as I was visiting YT just now.





It's a bit bittersweet and frustrating to be excited about all these new features that I'd love to design my code around, yet can't do to any realistic extents for a couple of years, because while some compilers are shipping some features early, I just won't have them for all of my target systems for a couple of years probably. Makes me kind of want to drop my projects until all the compilers catch up again. But I'll hang in there. I've got C++14 working everywhere now so I'll try and cherish that for now. c:
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4369 on: September 22, 2016, 07:28:15 AM »

What features in particular?
Logged

oahda
Level 10
*****



View Profile
« Reply #4370 on: September 22, 2016, 11:24:31 AM »

Modules is one big one. We'll finally be able to write import std.io; instead of having wonky header file setups and slowing down compile times with text insertion includes and confusing #ifdefs because there are different default locations of libraries depending on the OS or STL vendor and so on...

Another big thing is coroutines added directly to the language as a feature (so not a library), which is really great. And just general improvements to parallellism and multithreading.

Fold expressions for parameter packs will probably be helpful. I think currently parameter packs can really only fold out to comma-separated lists AFAIK, but later something like sum = Ts + ... will work, expanding the values to be separated in more ways.

Concepts look cool, but I'll have to understand them better first. The constexpr is getting stronger with compile-time branching thanks to if constexpr, which is great.

Other things are just syntactic sugar, but which I really like, like template argument deduction on types (an std::pair<K, V> can be created like std::pair p{"key", 90};, where the template parameters are deduced from the constructor), and structured bindings (if one has a function that needs to return both a value as well as a success state, they might be returned as a struct holding those values; instead of having to store the struct and use dot notation to access the members, they can be directly returned into individual variables like auto [val, success](someFunc());, and now both val and success wil be individual variables available in the scope and there's no direct use of the struct).

And there's more, but I don't know enough about all of it.
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #4371 on: September 22, 2016, 01:34:12 PM »

Wait, modules are a thing that are coming to C++??

I need to keep up with the neeews.
Logged

powly
Level 4
****



View Profile WWW
« Reply #4372 on: September 22, 2016, 02:14:45 PM »

I've already learned to associate "import" with toy languages for children tho ;_;
Logged
oahda
Level 10
*****



View Profile
« Reply #4373 on: September 23, 2016, 02:12:37 AM »

I've already learned to associate "import" with toy languages for children tho ;_;
You'll be importing and writing the same code as before—don't worry. c;

The syntax to write a module adds the new keyword module and finds new use for export, so it looks something like this:

Code:
module blah;

export class C { ... };

Code:
import blah;

Which means there can be stuff that's not exposed in the file as well, which is very handy. All the unnecessary stuff showing up in autocompletion because library writers couldn't hide it away before has been a bit annoying IMO.
Logged

Dacke
Level 10
*****



View Profile
« Reply #4374 on: September 23, 2016, 02:48:03 AM »

toy languages for children tho

time to go back to assembly like a real grownup?
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
Average Software
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW
« Reply #4375 on: September 23, 2016, 03:45:06 AM »

toy languages for children tho

time to go back to assembly like a real grownup?

You bet.  I've started writing Atari 5200 games in 6502 assembly and it's super fun.  I have a game being published by AtariAge later this year.
Logged



What would John Carmack do?
powly
Level 4
****



View Profile WWW
« Reply #4376 on: September 23, 2016, 04:06:35 AM »

Ah, sounds reasonable. And pretty handy too!

toy languages for children tho

time to go back to assembly like a real grownup?

Indeed!! I also need to take a step back from the keyboard and evaluate if my "ironic" loathing towards certain languages has gone too far when it comes out that casually. Heck, not only certain languages but some other concepts as well.
Logged
Dacke
Level 10
*****



View Profile
« Reply #4377 on: September 23, 2016, 04:08:30 AM »

assembly is actually fun as heck, but yeah, gotta tease you when you go too salty Tongue
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
Cheezmeister
Level 3
***



View Profile
« Reply #4378 on: September 25, 2016, 06:20:34 PM »

I've been messing around with Elixir and it's rad! You get the power of Ruby, the speed of Java, the safety of Erlang and the bit-twiddly goodness of C. Ain't much use for games, though.
Logged

෴Me෴ @chzmstr | www.luchenlabs.com ቒMadeቓ RA | Nextris | Chromathud   ᙍMakingᙌCheezus II (Devlog)
JWki
Level 4
****


View Profile
« Reply #4379 on: September 26, 2016, 12:33:19 AM »

... the speed of Java...

The what of Java?
Logged
Pages: 1 ... 217 218 [219] 220 221 ... 279
Print
Jump to:  

Theme orange-lt created by panic