Click here to Skip to main content
15,888,297 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: The joys of playing around Pin
theoldfool14-Mar-22 3:34
professionaltheoldfool14-Mar-22 3:34 
GeneralRe: The joys of playing around Pin
obermd14-Mar-22 3:35
obermd14-Mar-22 3:35 
GeneralRe: The joys of playing around Pin
David O'Neil14-Mar-22 4:06
professionalDavid O'Neil14-Mar-22 4:06 
GeneralPi Day today Pin
Amarnath S13-Mar-22 16:57
professionalAmarnath S13-Mar-22 16:57 
GeneralRe: Pi Day today Pin
megaadam14-Mar-22 0:54
professionalmegaadam14-Mar-22 0:54 
GeneralRe: Pi Day today Pin
obermd14-Mar-22 6:27
obermd14-Mar-22 6:27 
GeneralRe: Pi Day today Pin
oofalladeez34324-Mar-22 15:27
professionaloofalladeez34324-Mar-22 15:27 
RantI can't stand them, but I need them - nested template instantiations Pin
honey the codewitch13-Mar-22 16:44
mvahoney the codewitch13-Mar-22 16:44 
The STL does this too but it's annoying. You wind up declaring C++ templates that package a bunch of template parameters together as a unit, and then pass that as an argument to another template, and so on.

C++
rgb_pwm<
  rgb_pwm_group< // declares one rgb pulse width modulation group
    pwm_traits<32,0>, // Red: GPIO pin # 32, PWM channel 0
    pwm_traits<25,1>, // Green: GPIO pin # 25, PWM channel 1
    pwm_traits<26,2>  // Blue: GPIO pin # 26, PWM channel 2
  >
> p;


If that isn't the ugliest elephanting thing outside of preprocessor macros, I'm not sure what is.

Sure you can use typedef/using, but then you just end up adding even more lines of code.

I don't know what I want though. I guess JSON wouldn't be much more brief. I do kinda wish C++ allowed you to explicitly pass your arguments by name like you can do in C#. That way this would be at least a little more legible, if verbose.
To err is human. Fortune favors the monsters.

GeneralRe: I can't stand them, but I need them - nested template instantiations Pin
megaadam14-Mar-22 1:25
professionalmegaadam14-Mar-22 1:25 
GeneralRe: I can't stand them, but I need them - nested template instantiations Pin
honey the codewitch14-Mar-22 1:53
mvahoney the codewitch14-Mar-22 1:53 
GeneralRe: I can't stand them, but I need them - nested template instantiations Pin
megaadam14-Mar-22 2:17
professionalmegaadam14-Mar-22 2:17 
GeneralRe: I can't stand them, but I need them - nested template instantiations Pin
megaadam14-Mar-22 2:42
professionalmegaadam14-Mar-22 2:42 
GeneralRe: I can't stand them, but I need them - nested template instantiations Pin
honey the codewitch14-Mar-22 2:52
mvahoney the codewitch14-Mar-22 2:52 
GeneralRe: I can't stand them, but I need them - nested template instantiations Pin
megaadam14-Mar-22 3:53
professionalmegaadam14-Mar-22 3:53 
GeneralRe: I can't stand them, but I need them - nested template instantiations Pin
honey the codewitch14-Mar-22 4:03
mvahoney the codewitch14-Mar-22 4:03 
GeneralRe: I can't stand them, but I need them - nested template instantiations Pin
David O'Neil14-Mar-22 4:11
professionalDavid O'Neil14-Mar-22 4:11 
GeneralRe: I can't stand them, but I need them - nested template instantiations Pin
honey the codewitch14-Mar-22 4:22
mvahoney the codewitch14-Mar-22 4:22 
GeneralJunk mail...WTE, MS? Pin
dandy7213-Mar-22 5:57
dandy7213-Mar-22 5:57 
GeneralRe: Junk mail...WTE, MS? Pin
jmaida13-Mar-22 14:44
jmaida13-Mar-22 14:44 
GeneralRe: Junk mail...WTE, MS? Pin
dandy7216-Mar-22 5:22
dandy7216-Mar-22 5:22 
GeneralExpert... PinPopular
Kornfeld Eliyahu Peter13-Mar-22 1:57
professionalKornfeld Eliyahu Peter13-Mar-22 1:57 
GeneralRe: Expert... Pin
Slacker00713-Mar-22 3:15
professionalSlacker00713-Mar-22 3:15 
GeneralRe: Expert... Pin
Mike Hankey13-Mar-22 3:53
mveMike Hankey13-Mar-22 3:53 
GeneralRe: Expert... Pin
RickZeeland13-Mar-22 4:48
mveRickZeeland13-Mar-22 4:48 
GeneralRe: Expert... Pin
Mike Hankey13-Mar-22 4:58
mveMike Hankey13-Mar-22 4:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.