Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
Does decltype complicate the C++ spec/implementations very much? It seems like it would make typechecking and template expansion really difficult.

Adbot
ADBOT LOVES YOU

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

DONT THREAD ON ME posted:

Does decltype complicate the C++ spec/implementations very much? It seems like it would make typechecking and template expansion really difficult.

I don't think so? you could already use expressions in type definitions. it's not terribly different from sizeof in that regard, and it was already implemented by eg. gcc as an extension (named __typeof iirc). visual c++ didn't have it but through one of its own extensions and an incredibly convoluted contortion thereof (e: actually a compiler bug), that I never looked too hard into, you could implement it in a reasonably complete way (as done eg. by Boost.Typeof)

hackbunny fucked around with this message at 03:06 on Jan 11, 2019

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
yeah, the most complicated thing in c++ that most non-implementors are unaware of is that you can put almost any expression in a type (which you could always do because of array bounds and sizeof) and so there are all sorts of things like function template overloading that are dependent on arbitrary expression structure. this is why the itanium c++ abi has manglings for what’s almost a complete semantically-annotated reconstruction of the expression grammar

(there are a handful of things that are hand-waved in the spec as “it’s unspecified if you overload function templates based on this”, like if the same lookup resolves to different overload sets, and the abi doesn’t mangle those differences)

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
oh yeah of course, that makes sense.

Zlodo
Nov 25, 2006

jit bull transpile posted:

or just name it INCLUSIVE_MAX. that seems like the easiest part to solve unless I've totally misunderstood

this but EXCLUSIVE_MAX imo: it's easier to write the enum like this
code:

enum class blah
{
  Foo,
  Bar,

  EXCLUSIVE_MAX
};

Than this:
code:

enum class blah
{
  Foo,
  Bar,

  INCLUSIVE_MAX = Bar
};


and the later is also more error prone since you need to update the last line if you insert a new value after Bar

either way you pretty much have to use enum class for this to avoid name collisions with the MAX value between multiple enums

Lime
Jul 20, 2004

you could also make a traits class and specialize it for each enum. then you can fill it with whatever extra flags and data you need. if you forget to specialize it or leave something out, you'll get the same compile time errors

so like

code:
// generic code
template <typename T> struct StuffTrait;
template <typename T> void doStuff(T t) {
    if(StuffTrait<T>::inclusive) {
        // do something with StuffTrait<T>::max
    } else {
        // etc
    }
}

...

// some specific enum
enum class MyEnum : uint8_t {
  foo,
  bar,
  baz
};

template<> struct StuffTrait<MyEnum> {
    static constexpr uint8_t max = static_cast<uint8_t>(MyEnum::baz);
    static constexpr bool inclusive = true;
};
only thing to be aware of is that the template declaration of StuffTrait has to be visible before you can specialize it, so myenum.h is going to have to include the dostuff.h header or else you separate your traits into some other file and include that

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
on what world would “max” be exclusive

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
in that an enum value called "max", as a distinct value after all the other values, is the max value. I've seen it in codebases before.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



then it should be called ceiling or top or something imo

calling it max leads to confusion as it clearly isnt the maximum value....

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
or “num” or “count”, yeah

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

🎵 return of the MAX

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
i definitely prefer "count" but yeah everybody has weird codebase wrinkles and its not my job to tell them theyre wrong

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



you need to have someone to say "decision" so even if theyre wrong youre still all doing the exact same wrong thing

make someone there say "this is the final enum" and then thats it

then complain here

brand engager
Mar 23, 2011

so uh what's the difference between software development and software engineering? I've got my degree in computer and I still don't know

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
software development is a descriptive term for the processes of making software
software engineering is an aspirational term for the idea of applying sound engineering practices to making software
almost nobody does actual software engineering but there are a lot of people who do perform convincingly authentic rites and incantations before letting the programmers do what they always do

brand engager
Mar 23, 2011

cool guess I'll feel free to apply for any of those too

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
oh, as job titles they're interchangeable. different companies will use either "developer" or "engineer" for their programmers. means absolutely nothing

there is no agreement about numeric ranks between companies. with named ranks, there's general agreement that "junior" means someone who needs a lot of guidance to get anything done and "senior" means someone who can provide that guidance, but both might correspond to multiple levels of payscale

gonadic io
Feb 16, 2011

>>=

rjmccall posted:

software development is a descriptive term for the processes of making software
software engineering is an aspirational term for the idea of applying sound engineering practices to making software
almost nobody does actual software engineering but there are a lot of people who do perform convincingly authentic rites and incantations before letting the programmers do what they always do

I've got a friend who programs for the military and he says he spends upwards of 80% of his time with uml diagrams and hundred page requirement/api docs, sounds loving miserable imo

The other 20% being dealing with the grey beards who have full pension, effectively tenure, and haven't learned a new fact in 30 years and not about to start now

Cybernetic Vermin
Apr 18, 2005

rjmccall posted:

software development is a descriptive term for the processes of making software
software engineering is an aspirational term for the idea of applying sound engineering practices to making software
almost nobody does actual software engineering but there are a lot of people who do perform convincingly authentic rites and incantations before letting the programmers do what they always do

depends on where you are as well of course, in some countries it is a defined diploma which requires a broader mix of subjects (e.g. courses in ethics, organizational theory and the philosophy of science)

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice
i worked for a company that called computer engineering grads "engineers" and everyone else "developers" (incl cs degree holders)

it had zero influence on your status, salary, job duties, etc at the company though

Mahatma Goonsay
Jun 6, 2007
Yum
when I coded serial device drivers for medical equipment I was a “programmer”. now that I make lovely web apps I’m an “engineer”.

luchadornado
Oct 7, 2004

A boombox is not a toy!

brand engager posted:

so uh what's the difference between software development and software engineering? I've got my degree in computer and I still don't know

ive seen people use "developing" in a degrading way to imply just churning out rote code to accomplish something, and "engineering" conveys a striving for elegance or applying more academic / sophisticated concepts to something. that ignores the fact that 99% of developers are not doing anything new or exciting, but whatevs.

Doom Mathematic
Sep 2, 2008
I feel that an "engineer" should have some kind of professional liability for the quality/safety of their work. That's why I call myself a developer.

raminasi
Jan 25, 2005

a last drink with no ice

Doom Mathematic posted:

I feel that an "engineer" should have some kind of professional liability for the quality/safety of their work. That's why I call myself a developer.

:same:

cinci zoo sniper
Mar 15, 2013




in latvian “software engineering” sounds very goofy so everyone is just a something programmer

cinci zoo sniper
Mar 15, 2013




much rarer - something development specialist

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

those are much better titles tbh

mystes
May 31, 2006

cinci zoo sniper posted:

much rarer - something development specialist
"Development specialist" sounds like you specialize in developmental disorders.

cinci zoo sniper
Mar 15, 2013




mystes posted:

"Development specialist" sounds like you specialize in developmental disorders.

nah it's, for example, front-end development specialist

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
"software developer" and "software engineer" mean the same thing as titles, but beware of jobs with the title "programmer". for some reason certain companies use that title to imply a lower-skilled and lower-paid position, someone who just codes what they're told to, possibly interchangeable with offshore

fritz
Jul 26, 2003

mystes posted:

"Development specialist" sounds like you specialize in developmental disorders.

sounds like something that disappeared with digital cameras

MononcQc
May 29, 2007

In some jurisdiction, the engineer title is regulated, even for software. This is the case in Quebec, where you have to study in a certified program, pass an exam that includes a lot of knowledge from regular engineering disciplines and civil responsibilities, complete an apprenticeship under an already-certified engineer, get professional insurance, etc. The OIC (order for all engineers) even won a lawsuit against microsoft for providing "Microsoft Certified Systems Engineer" certifications, which they saw as encroaching on their discipline.

I'm a developer because doing otherwise is kind of risky. I'm sometimes tempting the devil with being a "systems architect" because actual architects don't seem to be too protective of that term in other disciplines.

Shaggar
Apr 26, 2006
well architect isn't a real discipline

TOPS-420
Feb 13, 2012

for all you windows internals fans this is a p great breakdown of all of windows event handling mechanisms and a bunch of their quirks and limitations

https://github.com/python-trio/trio/issues/52

quote:

Windows has 3 incompatible families of event notifications APIs: IOCP, select/WSAPoll, and WaitForMultipleEvents-and-variants. They each have unique capabilities. This means: if you want to be able to react to all the different possible events that Windows can signal, then you must use all 3 of these. Needless to say, this creates a challenge for event loop design. There are a number of potentially viable ways to arrange these pieces; the question is which one we should use.

(Actually, all 3 together still isn't sufficient, b/c there are some things that still require threads – like console IO. But never mind. Just remember that when someone tells you that Windows' I/O subsystem is great, that their statement isn't wrong but does require taking a certain narrow perspective...)

TheFluff
Dec 13, 2006

FRIENDS, LISTEN TO ME
I AM A SEAGULL
OF WEALTH AND TASTE

TOPS-420 posted:

for all you windows internals fans this is a p great breakdown of all of windows event handling mechanisms and a bunch of their quirks and limitations

https://github.com/python-trio/trio/issues/52

this is cool, thanks

JawnV6
Jul 4, 2004

So hot ...
the first PE i worked with put sleep() in an ISR (its bad) and pitched a fit when i said to find another solution in the review

he called it 'debouncing'

i haven't been all that impressed with PE's

abigserve
Sep 13, 2009

this is a better avatar than what I had before

Doom Mathematic posted:

I feel that an "engineer" should have some kind of professional liability for the quality/safety of their work. That's why I call myself a developer.

I'm a senior train driver (that's what we call network engineers here) and indeed I am required to pay for professional liability insurance - let me tell you it's loving expensive

edit; i'm a consultant tho salaried people don't have to pay ofc

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

TOPS-420 posted:

for all you windows internals fans this is a p great breakdown of all of windows event handling mechanisms and a bunch of their quirks and limitations

https://github.com/python-trio/trio/issues/52

I wonder why microsoft never made an async I/O variant of select/poll so you could get writability/readability notifications on a iocp, instead of having to mix async and non-blocking styles. hell it could have been done with special flags to WSASend/WSARecv, to ask for a non-blocking send/receive. immediate completion would mean the operation completed without blocking, asynchronous completion with error WSAEWOULDBLOCK would mean "try again now", so it could be easily used in a loop and you wouldn't pay the cost of two system calls

hackbunny fucked around with this message at 00:11 on Jan 17, 2019

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
many places in the us consider "programmer", "software developer", and "software engineer" to be three ascending tiers of skill and pay grade. consultancies often like to give people "software engineer" as a title in order to justify charging clients more. it's basically just marketing puffery in those situations

i prefer to be called "developer" because while i strive to do a good job and write good code i am not liable for software failures; sort of related to why i prefer not to work on systems which, should they fail, would endanger lives

my company recently did a whole drawn out title normalization process and they decided to call us "software development engineers" which is loving ridiculous

Adbot
ADBOT LOVES YOU

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

JawnV6 posted:

the first PE i worked with put sleep() in an ISR

JawnV6 posted:

he called it 'debouncing'

ok I'm so mad but this fuckin owns actually :chome:

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply