Reply to post: mumbo jumbo

Turing Award winner Barbara Liskov on CLU and why programming is still cool

vektorweg

mumbo jumbo

I used to code in C++ . In hindsight, its a bunch of mumbo jumbo.

Attaching a method to a class is a feelgood exercise - humans just love grouping things. But what you gonna do if you have an operation on several types that are hierarchically unrelated to each other? Who's gonna get the method then? Your god object? Hard encapsulation is overrated. Look at functional programming: putting loosely related functions and data definitions into the same module file is just good enough for encapsulation's sake. With a proper type system in place, there's nothing that could break from that approach.

Error handling is definitely a concern. Especially when the entire stack from software to hardware works on exceptions, which may leave undefined state left and right. However, you can still try to abstract away from these shortcomings in your applications. Like doing computation and exception handling in a monad stack - that's a FP thing too.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2022