Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Are there any languages for programming-in-the-large?
9 points by khaledh on Aug 21, 2022 | hide | past | favorite | 12 comments
Almost every programming language in existence today focuses on programming-in-the-small: types, classes, functions, control flow, etc. This is OK for putting together small programs. But when it comes to designing large, complex systems, it's really up to the programmer/team to define the design out-of-band (docs, diagrams, conventions, etc) and then use the programming language to implement the design.

Are there programming languages that help with the high-level design of programs? Concepts in such a language could be: system, subsystem, component, composite, constraint, plugin, interface/protocol, data flow, storage, async process, etc. Note that this is not about distributed system design; all the above elements could be in the same process.

Another important aspect is help with defining a meta-model of a system. A program meta-model fills some gaps between the language model and the actual domain model of the program. For example, a meta-model of a front-end UI library could define the concept of unidirectional data flow, which enforces data flow in one direction.



C++, Java, Go, Ada, Erlang. These are all designed explicitly for programming-in-the-large.

I think the reason you still see classes and modules as the top-level abstraction in programming-in-the-large languages is because people have found that having hierarchically composable uniform abstractions is a more effective approach for large-scale system design than creating specialized concepts for system, subsystem, component, etc. An interface in Java might be a first-class function, or it might be the entry point to a distributed system running on 10,000 machines with 15 million lines of code. But the key point is that by representing that as an interface, all the other hundreds of services that the system might interact with can be treated in a uniform way in the language, and can also be treated uniformly with in-memory, in-process systems like hash tables and function calls. This is an incredibly powerful feature.

There's a lot of debate in the language design community over which abstractions are fundamental, which is why you get different languages. But personally, I think you're fine with a.) functions b.) structs (classes when you combine them with functions, and then from there, types, storage, components, composites, subsystems, systems) c.) interfaces (protocols, plugins) and d.) annotations (constraints, async, and marking the special cases of all of these fundamental concepts.). That's really all you need.


>> C++, Java, Go, Ada, Erlang. These are all designed explicitly for programming-in-the-large.

Absolutely correct. Each one has strengths and weaknesses and were designed for specific use cases and needs. One of them probably will meet your use case.


Interesting when you put it this way.

> people have found that having hierarchically composable uniform abstractions is a more effective approach for large-scale system design than creating specialized concepts ...

Well, I can understand that uniformity can be appealing for sure, but at the same time it doesn't _guide_ the design; too much choice can be paralyzing. The ultimate uniform language is Lisp, but it leaves too much up to the programmer to come up with a sound design.

I still think there's room for a more opinionated language when it comes to designing large scale systems (again nothing to do with distributed systems; it could well apply to a monolith).


I don't think anything exists that could totally satisfy your constraint because your concept is hyper abstract.

That said, I would recommend looking into AWS CloudFormation, AWS CDK, and Terraform.


Thanks for the suggestion. But those are distributed systems aids. What I'm looking for is something that ca be applied to any large scale system, even if it's a monolith.


Smalltalk is meant to be the thing you're looking for. Alan Kay's given talks about this. Whether it actually works well in this respect, I don't know.


No, there aren't.

I have seen one example thought. But it was closed source in-house SW.

Maybe LabVIEW is close to this idea.

There are also interesting research projects on this topic, like Ptolemy. Or eTrice.

There were a few attempts to achieve this goal in the past, but all those companies have been eventually bought by IBM and now they sell their monster-tool for huge amount of money, so it's irrelevant in practice.


It sounds like you might be interested in checking out IEC 61499 Function Blocks - this is a new -ish automation programming standard / domain specific language. It allows for concepts as you are describing them, with communication blocks, basic blocks, composite blocks, etc, deployed to resources and systems.


I like the GALS model of computation but, at least last time I looked, the tooling and languages were pretty rubbish.


The tooling is definitely rubbish, but that's something that can be iterated over.


Prolog, Mercury[0]? :)

[0] https://mercurylang.org


In addition to the other suggestions mentioned in this thread, see also the Eiffel language - https://en.wikipedia.org/wiki/Eiffel_(programming_language)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: