2 ms·
Safety and correctness certainly are important -- but they're also orthogonal to maintainability (among other values)! It's good to have most of the core value
by nemo1618 5y ago
Safety and correctness certainly are important -- but they're also orthogonal to maintainability (among other values)!
It's good to have most of the core values in common, but a language's guiding principle manifests in many small ways that can be very compelling in aggregate. Go's weird capital-letter namespace visibility rule is a great example of this: it has nothing to do with safety or correctness, but it's enormously helpful for getting your bearings in unfamiliar code, because it localizes an important piece of information, saving you a context-switch. Sure, another language might hit upon this feature incidentally (Rust has conventions around capitalization, and IIRC Haskell enforces it to some degree), but how many languages will chance upon all of the little things that make for a great engineering language?
- Jtsummers 5y agoI keep writing poor tutorials (due to space) of Ada here. Check out https://learn.adacore.com/ https://learn.adacore.com/ for more. Overall I like Go, but for software engineering in the large Ada, in contrast to Go, has: Explicit separation of specification and implementation of packages and types making it easier to shard the work out to numerous individuals and teams. What a package exports is explicit, not the result of case conventions. package Foo is procedure Bar(N : in Integer); -- exported private procedure Baz(N : out Integer); -- unexported end Foo; package body Foo is -- implementations of the above end Foo; Generics from day 1, which enabled a set of collection packages similar to C++'s STL in Ada 2005 among other things. Tasks, similar to Go's goroutines, but have a lot of additional guarantees and behaviors that have to be made explicit in Go. Protected objects and protected types which permit you to write code without explicitly acquiring/releases mutexes and using condition variables. Design-by-contract with SPARK/Ada becoming a proper subset of Ada in Ada 2012.
- kbenson 5y ago> but they're also orthogonal to maintainability Not entirely. Some amount of maintainability is fixing mistakes that result in less correct or safe programs. By reducing occurrences of these classes of problems later, you're reducing the maintainability burden. It's the same thing that makes a language with a type system more maintainable in the long run. Eliminating classes of errors pays dividends later. The decision to make is whether the extra effort at the time of creation is worth that reduction. Depending on the type of software, it's expected lifetime, and how many people are expected to use it, that may differ. For large scale engineering, I imagine the extra effort required up front is almost always worth it.