massimo

massimo

What about defprivate?

Showing Posts 21 to 12

al2o3cr

al2o3cr

I believe some of that work was included in the 1.11 release - elixir/CHANGELOG.md at v1.11 · elixir-lang/elixir · GitHub

tanweerdev

tanweerdev

so next question: is there any plan to merge boundary(or modified version of it) into core Elixir? That would be nice :heart_eyes:

josevalim

josevalim

Creator of Elixir

As mentioned in the proposal discussion, we favored option A and Boundary provides a more complete implementation - so I would advise to use that. We have no plans to introduce defmodulep in core. You can see the proposal discussion for my rationale.

Exadra37

Exadra37

I know is archived, sorry to have mislead you about my intentions in my question. I don’t want to use it directly, but instead my question intention was when could we expect it in Elixir itself.

I though the repo for defmodulep was a playground for this proposal by Jose, but I noticed now that unfortunately it seems the preference goes to option A.

Any idea when Option A will be available in Elixir core?

I am not planning in developing a new library at all, and I already know about Boundary, but I was really expecting to have private modules in Elixir. I would prefer this to be built-in in the language then enforced by a dependency.

axelson

axelson

Scenic Core Team

I don’t think defmodulep was ever on a track to be generally available/used, it was created more as a proof of concept. And now that the repository is archived it will no longer be developed (although of course if it Apache v2.0 so you can fork and maintain it if you want).

But I think that Boundary - enforcing boundaries in Elixir projects is a more promising alternative so I’d recommend you take a look at that instead or develop a new library.

Exadra37

Exadra37

Any idea when defmodulep will be available?

Exadra37

Exadra37

I just found defmodulep… Seems to me like the playground for the idea, or its the official implementation?

gregvaughn

gregvaughn

Since erlang requires a declaration of which functions are exported, yeah, I think the idea was considered. I have mixed feeling on the result, but I don’t question its consideration. In any case this is a majorly backwards incompatible change that would require a very strong argument to support it.

jeramyRR

jeramyRR

I haven’t read through all the threads on this topic but has the community thought about going the route Rust took, where every function is private by default? To make something public you have to declare it public like:

pub def this_is_my_public_facing_api(), do: # do something great

This way we don’t have to worry about private modules or whatever.

gregvaughn

gregvaughn

I think the bikeshed should be painted green, for what its worth :wink:

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 94592 917
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
heathen
Quite interesting article Google brought me. Didn’t find any mentions about it here. What do you think in general? Would you use togethe...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
AstonJ
Since we have deprecated our Erlang sections (as we have dedicated Erlang Forums now) let’s add this thread for those who’d like to post ...
New
maennchen
:warning: Security advisory: Decimal DoS vulnerability A vulnerability has been published for decimal where very large exponents can cau...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews