Click here to Skip to main content
15,847,427 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
trønderen25-Sep-23 9:13
trønderen25-Sep-23 9:13 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
raddevus25-Sep-23 9:29
mvaraddevus25-Sep-23 9:29 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
haughtonomous26-Sep-23 22:53
haughtonomous26-Sep-23 22:53 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
Jon McKee25-Sep-23 11:26
professionalJon McKee25-Sep-23 11:26 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
raddevus25-Sep-23 11:36
mvaraddevus25-Sep-23 11:36 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
Jeremy Falcon25-Sep-23 13:33
professionalJeremy Falcon25-Sep-23 13:33 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
Jon McKee26-Sep-23 10:53
professionalJon McKee26-Sep-23 10:53 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
Jeremy Falcon25-Sep-23 13:33
professionalJeremy Falcon25-Sep-23 13:33 
Realistically though, how often do you need to contextual inputs like that? If it's external user input, it should always be sanitized first. Which means you can transform any exceptions in that layer. If it's internal user input, how often do you really change contexts like that in practice?

Don't get me wrong, nothing against structs as a param, but having said logic to handle the contextualization in every last routine that uses it (it's for inputs) isn't ideal.

I'd argue structs are useful for abstracting complex data types only, irrespective of the context in which they are called with.
Jeremy Falcon

GeneralRe: The changing landscape of OOP (from class to struct) Pin
Jon McKee26-Sep-23 10:51
professionalJon McKee26-Sep-23 10:51 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
Jeremy Falcon27-Sep-23 3:36
professionalJeremy Falcon27-Sep-23 3:36 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
Jon McKee28-Sep-23 15:17
professionalJon McKee28-Sep-23 15:17 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
Richard Deeming25-Sep-23 23:02
mveRichard Deeming25-Sep-23 23:02 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
trønderen26-Sep-23 10:31
trønderen26-Sep-23 10:31 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
Jeremy Falcon27-Sep-23 4:17
professionalJeremy Falcon27-Sep-23 4:17 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
RainHat26-Sep-23 1:02
RainHat26-Sep-23 1:02 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
charlieg26-Sep-23 8:42
charlieg26-Sep-23 8:42 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
trønderen26-Sep-23 10:47
trønderen26-Sep-23 10:47 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
Nelek27-Sep-23 10:12
protectorNelek27-Sep-23 10:12 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
haughtonomous26-Sep-23 22:11
haughtonomous26-Sep-23 22:11 
PraiseRe: The changing landscape of OOP (from class to struct) Pin
Jeremy Falcon27-Sep-23 5:17
professionalJeremy Falcon27-Sep-23 5:17 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
Peter Adam26-Sep-23 23:20
professionalPeter Adam26-Sep-23 23:20 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
Richard Deeming27-Sep-23 0:13
mveRichard Deeming27-Sep-23 0:13 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
haughtonomous3-Oct-23 22:33
haughtonomous3-Oct-23 22:33 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
Steve Naidamast27-Sep-23 5:19
professionalSteve Naidamast27-Sep-23 5:19 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
raddevus27-Sep-23 9:51
mvaraddevus27-Sep-23 9:51 

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.