this post was submitted on 02 Aug 2023
6 points (100.0% liked)

Programming Languages

1187 readers
1 users here now

Hello!

This is the current Lemmy equivalent of https://www.reddit.com/r/ProgrammingLanguages/.

The content and rules are the same here as they are over there. Taken directly from the /r/ProgrammingLanguages overview:

This community is dedicated to the theory, design and implementation of programming languages.

Be nice to each other. Flame wars and rants are not welcomed. Please also put some effort into your post.

This isn't the right place to ask questions such as "What language should I use for X", "what language should I learn", and "what's your favorite language". Such questions should be posted in /c/learn_programming or /c/programming.

This is the right place for posts like the following:

See /r/ProgrammingLanguages for specific examples

Related online communities

founded 2 years ago
MODERATORS
top 2 comments
sorted by: hot top controversial new old
[โ€“] verstra 2 points 1 year ago

Aren't java packages strong modules? You can create circular dependencies between packages just fine.

[โ€“] qwertyasdef 2 points 1 year ago

I'm not sure this blog post makes the right comparison. Based on my admittedly limited experience, OCaml modules seem more comparable to Java classes than packages. They're both bundles of functions and data, except the module contains data types instead of being the data type itself. Classes have basically all the features of strong modules like separate compilation, signatures (interfaces), functors (generics), namespacing, access control. These examples of OCaml modules are all things that would be implemented as a class in Java.

From this perspective, rather than Java lacking strong modules, it actually has them in the form of classes. It's OCaml which lacks (or doesn't need) an additional package system on top of its modules.